Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
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)?
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.
Hi Gysbert
Basically, I'm asking why my single-dimension table doesn't show anything when I put in the condition described above.
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
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.
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