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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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