I have calculated "Month" from a DateTime field as "DatePart('Offence Date'n)", formatted as MONTH7. I would like to show only the last 13 full months of data in a crosstab of Offences by month (i.e., this month, I want to see September 2018 to September 2019; next month, I want to see October 2018 to October 2019). Any ideas how to do this?
Hi!
Create a numeric variable from the date variable and use rankings to show the top 13.
Base the ranking on the new numeric variable and use the date variable as ranking variable.
I normally uses this approach to show the latest month/quarter in my reports.
//Fredrik
Hi!
Create a numeric variable from the date variable and use rankings to show the top 13.
Base the ranking on the new numeric variable and use the date variable as ranking variable.
I normally uses this approach to show the latest month/quarter in my reports.
//Fredrik
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.