BookmarkSubscribeRSS Feed
Obsidian | Level 7

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.

SAS Employee

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:

  1. Create a new calculated column and simply drag in the parameter:
  2. Add a list table and add your calculated column as a row
  3. Select different values of your parameter to view its raw value 





Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 1 reply
  • 2 in conversation