Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_chilvers
Specialist
Specialist

Conditional dimensions V11

Hi

I am new to version 11, and am pleased to see a new feature for 'conditional' dimensions.

I am struggling to see how this is intended to work. The new reference manual seems to miss it out altogether, and examples I have seen do not give the whole story.

Could anyone point me to where I should look?

For example, must the condition include the dimension.

If I have a single dimension called CRUISE, would a condition of LEFT(CRUISE,1) ='L' just show a table with cruises which start with an L ?

 

Also, would LEFT(DESCRIPTION,1) = 'L' be allowed if DESCRIPTION is not a dimension?

Thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The conditional display for dimensions and expressions shows or hides the entire column. It doesn't filter rows. If you want to filter the rows you can use an expression as a calculated dimension. Select your CRUISE dimension, click on Edit and enter your expression: =if(left(DESCRIPTION,1)='L',CRUISE). You'll probably want to check the option Suppress When Value Is Null for the calculated dimension too.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

The conditional display for dimensions and expressions shows or hides the entire column. It doesn't filter rows. If you want to filter the rows you can use an expression as a calculated dimension. Select your CRUISE dimension, click on Edit and enter your expression: =if(left(DESCRIPTION,1)='L',CRUISE). You'll probably want to check the option Suppress When Value Is Null for the calculated dimension too.


talk is cheap, supply exceeds demand
richard_chilvers
Specialist
Specialist
Author

Hi

Thanks for your helpful answer.

I have used calculated dimensions in the way you suggest, but I try to avoid them as not being very efficient (and I do something in the script if necessary).

However, if CRUISE is the only dimension, putting a condition in would have the effect of only showing the chart where that condition is met (ie. filtering the rows)?

Gysbert_Wassenaar

I'm not sure what you're asking. An expression for conditional display of a dimension or expression should return a boolean True or False value. 0 is false, any number unequal to 0 is true. A use case for conditional display is making it possible for users to select fields to dynamically build a chart with only the selected fields. The What's New in Qlikview 11 document has an example of this on the Reports tab.


talk is cheap, supply exceeds demand
richard_chilvers
Specialist
Specialist
Author

Hi Gysbert

Basically, I'm asking why my single-dimension table doesn't show anything when I put in the condition described above.

Not applicable

Actualy what u wants to do..

Do you wants to hide dimension or reduce result data?

"Conditional Dimension" will hide dimension if the expression is failed..

So in your case, you are using only one dimension and expression of that "conditional dimension" also failed. So its won't show any data.    

Karthik

Gysbert_Wassenaar

LEFT(DESCRIPTION,1) = 'L' isn't an expression. It's a condition that could be part of an expression, e.g if(LEFT(DESCRIPTION,1) = 'L', 1, 0). And that will evaluate as 0 if you use it as a conditional display expression since DESCRIPTION won't have a value in the context of the whole chart. It would hide the dimension.


talk is cheap, supply exceeds demand
richard_chilvers
Specialist
Specialist
Author

Thanks Gysbert

I understand now, that the dimension condition is evaluated in the contect of the whole chart to determine whether that dimension should be shown. Therefore it cannot work as a 'filter' in the way I had hoped. Ah well, at least I have already found a use for the new dimension limits tab

Thanks for your interest and advice.

Regards