Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to understand the quantity of months selected through a filter using
=GetSelectedCount(MonthShortname)
This works fine if i select on filter with just monthshortname as the dimension and I'll get a value 0 - 12
but if i use a formula as the filter dimension
If(Match([_CYTD_flag],'1') or Match([_PYTD_flag],'1'), MonthShortname)
regardless of how many months i select , the get count remains at zero
What am i missing here, im still selecting months?
thanks
You are not selecting a native field with your calculated dimension and therefore getselectedcount() couldn't work. To get the count you may calculate it with:
count({<_CYTD_flag={1}>+<_CYTD_flag={1}>} distinct MonthShortname)
- Marcus
Try below
Aggr( only({<_CYTD_flag={1}>+<_CYTD_flag={1}>}MonthShortname),MonthShortname)
or
Aggr(If([_CYTD_flag=1 or _PYTD_flag=1, MonthShortname),MonthShortname)
You are not selecting a native field with your calculated dimension and therefore getselectedcount() couldn't work. To get the count you may calculate it with:
count({<_CYTD_flag={1}>+<_CYTD_flag={1}>} distinct MonthShortname)
- Marcus
With the top solution you potenitally lose visability of the months in the dropdown when selected, but a neat solution. So in this situation Marcus solution worked better -
thanks both