Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a straight table where I want to put a condition on 4 of the expressions to say if these month are selected then show. I am able to do it for if just one month is showing i.e (Month=1) however I want to say if Month=(1,2,3) then show.
Thanks in advance.
Try the below expression in condition
=if(GetFieldSelections(Month)=1 and GetFieldSelections(Month)=2 and GetFieldSelections(Month)=3, 1, 0)
Thank you
Vardhan
Try getfieldselections() and/or getfieldselectionscount() to read or count the current selections.
- Marcus
=if(GetFieldSelections(Months)=1 or GetFieldSelections(Months)=2 or GetFieldSelections(Months)=3,Year,Week)
something like this can help you .
Neither of these work but thanks
Try it again - generally it will work. Perhaps you could also use a simple count-function about the month: if(count(distinct Month) = 3, true(), false())
- Marcus
Try the below expression in condition
=if(GetFieldSelections(Month)=1 and GetFieldSelections(Month)=2 and GetFieldSelections(Month)=3, 1, 0)
Thank you
Vardhan
That would work with ORs instead of ANDs.
You want this condition for whole chart/table or for particular some field or expression?
For whole Chart/Table use below in
Layout
Show - Condition
Month = 1 or Month = 2 or Month = 3
Or Try Below
=GetFieldSelections(Month) = 1 or GetFieldSelections(Month) = 2 or GetFieldSelections(Month) = 3
For Particular Expression...
Try as below
=IF(GetFieldSelections(Month) = 1 or GetFieldSelections(Month) = 2 or GetFieldSelections(Month) = 3, SUM(Sales)))
Anna,
If you want the months 1, 2 and 3 to be selected to perform an action, you may simply do:
if( substringcount( concat(distinct Month, ','), '1,2,3') =1, your action or everything you want)
Concat() will create a string. Substringcount() will return 1 if OK, 0 if it does not find (in fact, this function returns the number of times it finds the expression)
Fabrice
Vardhan A Thank You this works.
However I also want it to show if all 3 are selected can I do that in the same condition?