Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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.
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.
Use the intersection operator *
sum({$<Year *= {2000}”}>} Sales)
Wow, that's easy. Thanks Gysbert