BookmarkSubscribeRSS Feed
Calcite | Level 5

I am trying to figure out the easiest way to insert multiple values into a filter in a SAS VA report.


For example, if I have a list of identification numbers for some customers in Microsoft Excel, which I need to insert into a filter in my report, how do I do it the easiest?


I do not want to enter each individual identification number in SAS VA one by one.


There must be a smart way. Unfortunately, I just can't figure it out myself.




There might be a better way, but one approach would be:


1. Using a text editor or some other means, make the list of values into a comma-separated list. If the values are numerics, they can be like this: 1,2,3 if they are character values they should be like this: 'ABC','DEF','GHI'. Using regular expressions in your text editor is one way to perform the formatting.

2. In VA, create an advanced filter with the IN() or NOTIN() operator and select the "text" view in the expression editor.

3. Copy-paste the comma-separated values into the IN or NOTIN operator in the VA expression editor window.

This should work and should allow you to add a large number of values if needed.


I don't know if there is a way to programmatically read in the values and compare them within VA, but you could do this in your data preparation stage if you don't mind the filter being "baked in" to your VA table.


Someone else might have other ideas.





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
  • 1 like
  • 2 in conversation