Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis and filters

sum({$<Year={2000}”}>} Sales)

Returns the sales for current selection, but with new selection year=2000.  if someone applies a filter year=2001, the above set analysis still returns sum of sales for year 2000.  How do i modify this so that if a user applies no year filter it return sum of sales for year 2000, but if a user applies a filter year other then 2000, then the function returns 0?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

sum({$<Year*={2000}>} Sales). The * means intersect the user selection with the value 2000. So if the user selections something else than 2000 the intersection will be empty and the expression returns 0.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

sum({$<Year*={2000}>} Sales). The * means intersect the user selection with the value 2000. So if the user selections something else than 2000 the intersection will be empty and the expression returns 0.


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

Use the intersection operator *

sum({$<Year *= {2000}”}>} Sales)

Not applicable
Author

Wow, that's easy.  Thanks Gysbert