I’m trying to create a filter in my Quick Sight dashboard for a field called “Tier”, which contains the values “Tier 1”, “Tier 2”, “Tier 3”, “Tier 4”, and NULL.
I want to create a calculated field that gives me only two options to use in a filter:
“Tier 1 and Tier 2”: This option should represent a selection of just “Tier 1” and “Tier 2”.
“All Tiers”: This option should include all possible values: “Tier 1”, “Tier 2”, “Tier 3”, “Tier 4”, and NULL.
Could you please suggest a Quick Sight calculated field solution to achieve this?
I’m glad this worked for your scenario!
So when you build the parameter, it’s essentially creating values that you can use to handle scenarios, like we are doing in our ifelse calculation.
So in the calculated field, we’re essentially saying, if the parameter selection = ‘All tiers’, assign a 1 to each row. The second line says that if the parameter = ‘Tier 1 and Tier 2’ as well as the field ‘Tier’ = either ‘Tier 1’ or ‘Tier 2’, assign a 1.
So in my example, I left the ifelse field in the table to show the work being done; in the below screenshot, the parameter reads ‘AMER & APJ’ (like your ‘Tier 1 and Tier 2’), therefore the row with ‘AMEA’ has a ‘0’ instead of a ‘1’.