Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a condition for dimension value?

Hi,

I use 2 arrays with dates in my QV report -> Datum and Datum2.

There is a listbox for filtering by the dates which contains values from Datum.

Datum2 contains the same values, but not as many values as in Datum.

In my table, I use dimension Date -> if the date is selected in listbox, I want to use the value from Datum, but if NO date is selected in listbox, I want to use all values from Datum2.

I created calculated dimension, but it does not work as expected...

Condition like:

=if(Datum<>'',Datum,Datum2)

The result is that all values from Datum are used, when no selection of date was done - not correct.

I also tried this:

=if(Datum='',if(

Datum<>Datum2,Datum,Datum2),Datum2)

The result is that all values from Datum2 are used, when no selection of date was done - correct, but then when I select a date in Datum listbox which is not icluded in Datum2, it shows just empty table..

Please, help me.

Many thanks in advance

Nela

1 Solution

Accepted Solutions
sunny_talwar

Try this may be:

If(GetSelectedCount(Datum) = 0, Datum, Datum2)


If(GetSelectedCount(Datum) = 0, Datum2, Datum)

View solution in original post

5 Replies
sunny_talwar

Try this may be:

If(GetSelectedCount(Datum) = 0, Datum, Datum2)


If(GetSelectedCount(Datum) = 0, Datum2, Datum)

Not applicable
Author

Wow, that was easy..thank you sooo much!!!

sunny_talwar

Did that really work?? I was still trying to make sense of the expression I suggested:)

Not applicable
Author

Yeah, it works just as needed

sunny_talwar

Awesome