Issues with Reserved Values in Parameters

Hello,

I’m trying to create a calculated field using parameters, where I want certain logic to happen if the parameter has "Select All’ chosen vs "Select All’ not being chosen.

I’m trying to use the reserved values feature to accomplish this but running into issues. It seems to recognize when it’s not equal to select all but not when it equal to select all.

I made a sample to try and demonstrate:
Here is my parameter, with a static default of ALL_VALUES to align with the default reserved value

Here is my calculated field utilizing the parameter:
If the parameter is set to the Select All, it should say that select all is selected, if it’s not the select all, it should then say it is not the default, else it returns NULL
image

Here are the actual results based on the parameter selection:
All is selected but returns NULL, should return that All is Selected
image

When I change the parameter, it recognizes that it’s no longer equal to the default
image

So it only seems to sort of recognize that the default select all is selected. If it didn’t recognize it at all, then it should return All is not selected, when it is, but instead it returns NULL

Hello @divey - Can you please change the expression of your Test Field to something like below, which would also serve the same purpose.

ifelse(${paramTest} <> ‘ALL_VALUES’, ‘All Value is not selected’, ‘Default Select All is selected’)

I tried to replicate the same scenario with the above expression and it worked perfectly. Please see the below snapshot for your reference. Hope this helps!

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!

Hello Sagmukhe,

This unfortunately does not solve my problem. My example above was to show a simplified version of the problem but in reality, my calculated field is trying to base the result off the current status of multiple parameters at once so I need to be able to properly reference the select all state of multiple parameters at once.

What I’m actually trying to do for my calculated field, is more approximate to this below:
image

@divey

This might work…

I created 2 parameters (identical but in name: TestParam1 and TestParam2)

I created a calculated field and use AND

ifelse(
${TestParam1}<>‘All’, Country,
${TestParam1}=‘All’ and ${TestParam2}<>‘All’, City,
${TestParam1}=‘All’ and ${TestParam2}=‘All’, Industry,
‘XXX’
)

When I added the parameters to the sheet, I made sure I use dropdown and entered 2 specific values: All and NotAll

Everything works as expected. Try it and let us know.


image
image
image

I’ll mark this as a solution, but if your case is more complex please let us know.

Hi Gillepa,

I appreciate the help. It still unfortunately doesn’t solve the root issue of being able to reference the “Select all” state.

In my actual use case, my parameters are linked to a dataset field (with a lot of values), so manual entry for specific values isn’t an option.

My use case has two different parameter based filters. One linked to all Counties in a state, one for City. Then I need to use a different level aware calculation based on the state of the filters. The level aware calculations are around populations of County, City, State.

There are 3 main states then:

  • If City has anything selected, other than “Select All”, I need to use the level aware calculation for the City populations
  • If City is in the state of “Select All” but County has something selected, then it returns the level aware calculation for the County populations
  • If both City and County filters are in the “Select All” state, then it returns the level aware calculation for the Statewide population

So one, I actually need the “Select All” state to return the full list of City or County values. Then two, I need to be able to properly reference if it’s “Select All” or not

I can find other ways to go about this but it’s likely going to be less clean visually. Regardless though, I do feel it’s a bug with reserved values

Hi @divey

In this case, I’m wondering if you need parameters.
Can’t you use two filters City and County and use SHOW RELEVANT VALUES on both instead?
Can you try and let me know?


GL