BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
blewsas
Obsidian | Level 7

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?

1 ACCEPTED SOLUTION

Accepted Solutions
FredrikE
Rhodochrosite | Level 12

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

View solution in original post

1 REPLY 1
FredrikE
Rhodochrosite | Level 12

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1745 views
  • 1 like
  • 2 in conversation