Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
There is a filter pane named CATEGORY with values Cat-1, Cat-2, Cat-3.
~Apart from this I have Year, Month and Day filters.
i want to display sum based on the field selected by user in the UI. below is how my set expression looks like. Please suggest on how i can pass field CATEGORY in the set expression dynamically based on user selection in UI.
Sum({$<Year=, Month=, Day=,CATEGORY= ,
Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}
Count)
use expression as below :-
Below exp works on dynamic selection of User field.
sum({<USER={"$(=GetFieldSelections(USER))"}>}Count)
Just remove Year=, Month=, Day=,CATEGORY= , from your expression to make it responsible again to those selections.
thanks for the reply. below is how my set expression looks like. Seems data is just 0 :S
Sum(
Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}
Count)
This works well when we select only 1 value. if nothing is selected the value becomes 0 in the UI.
is there any way we can show default values when no filter applied based on the criteria in the set expression I have ?
Maybe there are future dates within the data-set. In this case you need to exclude them - maybe with another set analysis within the max(Date), like:
{">=$(=date(monthstart(max({< KPI = {"*"}>} Date))))<=$(=date(max({< KPI = {"*"}>} Date)))"}
whereby KPI is just a placeholder for an appropriate related field within your facts - something like Sales or Amount.