BookmarkSubscribeRSS Feed
Hessam
Fluorite | Level 6

Hi All

 

I have a numeric number like 2018 fed from a slider bar into a numeric parameter (year_parameter). 

I'd like to convert the value into a date year (YYYY) format in a new calculated column and then use the new calculated column as a filter criteria for the object in my report. 

 

Any idea how to do this?

 

year_parameter.JPG

1 REPLY 1
Sam_SAS
SAS Employee

Hello,

 

In 8.2 and later you can make date-based parameters, which would simplify things.

 

Otherwise, you can create a date value using a calculated expression like this:

 

DateFromMDY(1, 1, 'Parameter 1'p)

 

This will create values like '01 January 2018', but you can set the format of this data item to show the year only.

 

Let us know if this helps!

 

Thanks,

Sam

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 771 views
  • 0 likes
  • 2 in conversation