Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Wondering if someone could help explain why Qlik behaves this way....
When I use the following set analysis statement:
sum({<Year=,Quarter={'Q3'},Unit={'2000=100'},SubCategory={'Indx of Customer Price'}>}CPI)
the use of {<Year=, means that when a value(s) of Year are selected from the selection pane it does not filter any of the data.
However when you add any conditional statements in front of this say...
if(SubCategory='Indx of Customer Price',
<set analysis>
)
then when you apply the same Year selection - it marks the non-selected values as null, instead of leaving them there as it did with-out the conditional statement. The same happens if you use match, pick statements as well.
NB there is no other "SubCategory" values just
I've attached a very light demo app with instructions and how the behaviours are different if this helps explain.
Try including same set analysis components with the if condition like:
if(only({<Year>}SubCategory)='Indx of Customer Price'
Hi
remove year= from the set expression
Thanks
Try including same set analysis components with the if condition like:
if(only({<Year>}SubCategory)='Indx of Customer Price'
We don't want Years to filter out.
We know how to do workarounds - I'm looking to understand why the behaviour changes when the "if condition" is added in front.
Thanks @tresesco - this worked, and had to be the full set analysis of what was inside the condition statement.
if(only({<Year=,Unit={'2010 = 100'},Quarter={'3rd Quarter'}>}Subcategory)='Index of Consumer Prices',
sum({<Year=,Unit={'2010 = 100'},Quarter={'3rd Quarter'}>} CPI)
)