BookmarkSubscribeRSS Feed
Nmkristensen
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.

1 REPLY 1
Sam_SAS
SAS Employee

Hello,

 

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.

 

Sam

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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