"Select All" in parameter leads to blank values in chart

Hey there!

I came across a the same issue described in this thread: "Select All" problem in parameter for calculated field - #3 by ArunSanthosh

I have a multi parameter with a default values that are less than the overall options in the parameter/filter. I want it to be the case that when a user presses “Select All” for these parameters, that they get the entire dataset. Currently the result for this situation is that my calculated field is blank (as I imagine select all behaves differently than supplying the entire list of individual options). Is there an implementation/solution since Arun posted his response in April? I’m struggling to add this implementation into my existing ifelse calculated fields for checking the value of the parameter. Any advice or help with this would be appreciated.

Hi @ssol and welcome to the QuickSight community!
To check for the select all option in a calculated field for a multi value parameter, you have to check if NULL is in the multi value parameter. Select all will not actually contain the values in the dataset.
It would look like this:
ifelse(in(NULL, ${MultiValueParam}), {value},

Let me know if you have any additional questions or if this works for what you were aiming to accomplish.

Thank you!

Hey Brett, thank you for the quick and succinct reply!

So in this case, {value} would be a string of the names of the variables that encompass the total filter options? E.g. I would create a similar string to the “multiple default values” I can define in the parameter setup.

Hi @ssol, I want to make sure I fully understand the situation. If you have a multi-value parameter and you are trying to determine if values from your dataset field exist within the filtered options, you will utilize the in() function. This allows you to check for values that are stored in a parameter to determine if they match the values in your field.

If you are building an ifelse statement to check if the values stored (by default or by selection) match the field values, you will need to compare it to the field you are wanting to filter and check for the Select All option. I will use {value} to notate the field from your dataset that the control options would be coming from. The full calculation would look something like this:

ifelse(in({value}, ${MultiValueParam}) OR in(NULL, ${MultiValueParam}), {value}, NULL)

This will function as a filter. When your field value is within the list of selected options, it will return in the visual and when all options are selected, nothing will be filtered out. Let me know if this helps!

Hi @ssol, did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!

Hey there! Just wanted to chime in to say Brett’s answer solved it for me! I made my original calculated field filter an OR statement like above with another statement covering the NULL case and it worked! Thanks again for the quick replies.

2 Likes