BookmarkSubscribeRSS Feed
Mahis
Quartz | Level 8

Hi everyone,

 

Is it possible to load a file containing a list of IDs into a SAS VA report as a parameter, enabling the report to display only the records related to these IDs?

 

Thanks

3 REPLIES 3
arthurdpereira
Obsidian | Level 7

If I understood correctly, you want to filter the data in a report using specific filters. Let me try to provide some context with an example, okay?

 

I have a report that displays several charts for various cities in a state. However, I want the report to show only specific cities.

 

If this is your scenario, here’s how you can solve it:

  1. In your Visual Analytics report, go to Data > Click the icon on the right side next to your data source called Data Source Menu, and then select Apply Data Filters....

  2. A condition screen will appear. In the scenario we imagined above, the filter would be for cities. So it would look like this:

    ( 'ID_CITY'n In ('10', '11', '12') )

    Done! You have filtered your report by the city IDs you want to display.

Mahis
Quartz | Level 8

@arthurdpereiraYes, I want to use specific filters, such as Client ID. Since the number of clients for whom I need to retrieve records is around 200K, I cannot use standard filters. I would like to know if it is possible to use a parameter in SAS VA that accepts a CSV file as input and retrieves only the records for these 200K clients.

Stu_SAS
SAS Employee

Hey @Mahis! While parameters cannot accept a CSV file as an input, you can theoretically copy all 200K values and put them into an IN data source filter. I do not recommend doing this, as it is going to be extremely difficult to work with and you'll have an absolutely massive amount of code in a single file that might bog down your browser. In this case, you have two realistic options:

  1. Pre-process your data: create a SAS Studio flow that loads your data into Visual Analytics which keeps only the values that match from the CSV file
  2. Load the CSV file as a table and do an inner-join directly from Visual Analytics. Keep in mind that this option will create a new table, and that join will be created for each person who loads the report.

I highly recommend going with Option 1 and pre-processing your data in a code flow.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 3 replies
  • 232 views
  • 1 like
  • 3 in conversation