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

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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