Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a chart which is kinked to periods listbox selections: year, month, day
There is a Sum expression which should be calculated differenly in case a day or a month is selected.
For example, if a day is selected then sum(X).
For Month, it should be Sum(X+Y).
How can I distinguish between the selections?
Thanks in advance!
Hi,
You can create an expression for each Sum expression and activate the option conditionnal :
For example the condition GetFieldSelections(day) = 1 is true when one and only one day is selected.
Hope it helps.
Regards,
Nicolas
Use the method getSelectedCount(Field) to know hhow many rows of a field are selected. For your case, your can do:
if(getSelectedCount(Year)=0, sum(X), if(getSelectedCount(Month)=0, sum(X+Y))
Hi,
You can create an expression for each Sum expression and activate the option conditionnal :
For example the condition GetFieldSelections(day) = 1 is true when one and only one day is selected.
Hope it helps.
Regards,
Nicolas
Try with this
if(getselectedcount(Day)>0, Sum(X), Sum(X+Y))
Hi brain,
i have one doubt like if both are selected what you needed.
Thanks
Hi All,
Actually all answers were very helpful, but I liked the tip with the Conditional
Thanks!