Announcements
cancel
Showing results for
Did you mean:
Not applicable

## Set Analysis and Listbox

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.

1 Solution

Accepted Solutions
Partner - Creator II

try:

count(distinct {<STATUS*={'L','X'}>} MAIN_MEM_NO)

5 Replies

Try count(distinct {\$*<STATUS={'L','X'}>} MAIN_MEM_NO)

talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

You can remove  set analisys and  use the sentece if on  straight table

Example

If(STATUS= 'L' or 'X', count(Distinct  MAIN_MEM_NO)

Partner - Creator II

try:

count(distinct {<STATUS*={'L','X'}>} MAIN_MEM_NO)

Not applicable
Author

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.

talk is cheap, supply exceeds demand
Community Browser