Controlling Filters based on parameters

Hi There,

Context: I have a column called status which captures the status of the event. We have 14 distinct statuses and on a given day/period the volume of events in each status is what we are looking through a pie chart. So, to see active events which include 8 statuses out of these 14, we are now showing the visuals in a different sheet. The visuals shown on both the tabs are same but only difference is filters applied.

New initiative: I am trying to create a filter using a parameter by which if I select active it should select/include only some statuses which belong to active and select all in case of all events.

problem: I am neither able to create any calculated field to say if my parameter is x include the list of statuses from the status field nor am I able to make a filter change it’s selection based on the parameter clicking.

Looking forward for help from the community.

your parameter needs to be a single value with a default value, so you can use it in a calculated field.

Then you can use
ifelse(PARAMETER=“active” and status=“A”, 1,
Ifelse(PARAMETER=“All events”, 1,0))

For status=“A” you need to insert the correct condition for your case.

Then add a filter for this calculated field and the condition is Equals 1.

If you need more details or screenshots say so. :slight_smile:

@thomask Thanks for replying. But I tried doing the same and getting syntax errors.
In the status field, I have many values like of string type and for active events I have to pass multiple values not a single value. Like

ifelse( param = “Active”, {status} = “Withdrew” OR {status} = “Repaired” OR {status} = “Voided” OR {status} = “Rejected” OR {status} …)
I want the status field to include certain records only.


try this calculation:

ifelse( param = “Active” AND {status} = “Withdrew”
OR param = “Active” AND {status} = “Repaired”
OR param = “Active” AND {status} = “Voided”
OR param = “Active” AND {status} = “Rejected”
OR param = “Active” AND {status} = “…”,1,
ifelse(param=“All events”,1,0))

1 Like

Thanks @thomask
This helped and I am able to do the filtering based on the calculated field.


1 Like