cancel
Showing results for 
Search instead for 
Did you mean: 

Query Selection Criteria Question

Former Member
0 Kudos

I'm new with BW so forgive me if this seems naive. I have searched the various forums and have not found a solution to my problem.

I have a data source with two date dimensions, "created on" and "changed on" date. I want to select records with the criteria that EITHER the "created on" date or the "changed on" date is equal to a prompted date.

I can't seem to figure this out. Any help would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

This can be done in a few way's.

1. Via User Exit that will take the prompted date and filter on both fields.

2. prompt both fields.

3. enable the selection for the user as free selection.

I think that option num 1 is the most suitable if you want this to happen in the background, if you want this filter to be more flexible I would use option 3 and train the users to use it.

Reg's

Edan

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rick,

What Edan proposed will work as logical AND (both filters on dates will be checked simultaneously).

Here is a solution.

You’ll have a user entry variable on 0CALDAY.

- Create a new variable on 0CALDAY, customer exit, mandatory, not ready for input. This variable should return the date entered in user entry variable.

- Create a structure in columns.

- New selection (let’s name it chg). Put there your KF and your Change date char. Restrict it by the user entry var. Hide it.

- New selection (let’s name it crt). Put there your KF and your Created on date char. Restrict it by the customer exit var. Hide it.

New formula (let’s name it FilteredAmount):

( 'chg' <> 0 ) * 'chg' + ( 'crt' <> 0 ) * 'crt'

Create a condition:

FilteredAmount <> 0.

Best regards,

Eugene

Former Member
0 Kudos

In my case it is an infoprovider that I am trying to select in the query panel based on two different date dimensions. Again I am trying to select results based on "created on date" = yesterdays date OR "changed on date" = yesterdays date.

Former Member
0 Kudos

Hi,

Welcome to SDN!

I guess that your words "<i>data source with two date dimensions</i>" should be treated as "infoprovider with two date dimensions"?

If yes, then there is a solution on a query designer level.

If no, please clarify the issue.

Best regards,

Eugene