Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've got Straight Tables with the count and percentage of members, based on different dimensions. I'm using Set Analysis in the Straight Tables to only bring back members with a Status of L or X (cancelled members).
I also have a listbox that has L and X in it, so the user can filter based on L,X or both. However, selecting just one doesn't change the Straight Table (assuming due to the Set Analysis)
This is my Set Analysis code
count(distinct {<STATUS={'L','X'}>} MAIN_MEM_NO)
so the Straight Table starts with just members with L and X.
Is there anyway I can get it to work with the listbox, so that it defaults as L and X, but the user can choose just to see the count for either of them.
Try count(distinct {$*<STATUS={'L','X'}>} MAIN_MEM_NO)
You can remove set analisys and use the sentece if on straight table
Example
If(STATUS= 'L' or 'X', count(Distinct MAIN_MEM_NO)
try:
count(distinct {<STATUS*={'L','X'}>} MAIN_MEM_NO)
This worked. I don't know why, and it gives me an error (well, red squiggly lines), but this is awesome.
Thank you
It works because it is a short-hand version of count(distinct {$*<STATUS={'L','X'}>} MAIN_MEM_NO), meaning the intersection (that's what the * means) of the possible values of STATUS as a result of user selections with the values L and X. The red squiggle lines are a result of a bug in the expression syntax checker. The expression is correct and the syntax checker is wrong.