BookmarkSubscribeRSS Feed
Muandre
Obsidian | Level 7

Hey,

I am workting with SAS VIYA. I'm filtering with a date with a drop-down box. I want to show as default not the actual but the last month. How can I manage this?

Thank you,

muandre

3 REPLIES 3
Sam_SAS
SAS Employee

I believe that you can only set the drop-down box to select the first value.

 

For a slider, you can dynamically select either the first or last value, but this isn't quite what you want either. 

 

Sam

Muandre
Obsidian | Level 7

thank you for your reponse. is there a trick (eg with  help of a newly generated variable or a parameter) to put the last month first?

Sam_SAS
SAS Employee

VA supports custom sorts, but I don't know anything about how to make one and have never tried it. In theory, you could make a custom sort to put a certain date at the top. I don't know if this would have to be hardcoded or if you could programmatically select the previous month as part of your data query. If this is possible, you would do this using SAS code or maybe SQL. If this worked, you could apply the custom sort only to a duplicate of your date column to avoid unwanted side effects.

 

Something that would be easier to do would be to make a calculated measure based on the previous month. I believe this should be possible using the RelativePeriod operator. I don't know if that would be useful to you, however.

 

I hope this will give you some food for thought.

 

Sam

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 746 views
  • 3 likes
  • 2 in conversation