I'm passing the selected values of the drop-down into the parameter.
When the selection is cleared , the parameter displays "<No item selected>".
I'm using the parameter in a calculation. It seems that the calculation is retaining the result for the first condition of the IF-ELSE statement.
Hence I wanted to know the equivalent value for "<No item selected>" to ensure I get the correct results.
When there is no selection in a single-valued parameter, it produces a missing value. For numeric parameters, it is a dot ., for characters, it is an empty space ' '.
You can simplify this by using the missing() and notmissing() functions, which will automatically handle both numeric or character values. For example:
if(missing('parameter'p) ) return 1 else 0
If you are on SAS Viya, the isSet() function is a better alternative. isSet() returns True or False (1 or 0) depending on if a parameter has been selected. It can be used to get really great feedback on how someone is using the report. Plus, it works for both single-valued and multi-valued parameters.
if(isSet('parameter'p) ) return 1 else 0
Confirming Parameter Values
In case you ever need to confirm what the value of a parameter actually is in the background, here's a simple trick:
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.