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

Hi 

 

I would like to display 7 months data on a crosstab (Current month and 6 months prior).

 

Is there any suggestions i can use to achieve this?

 

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

You could use an advanced filter expression like this:

 

( TreatAs(_Number_, DatePart(Now())) - TreatAs(_Number_, 'Facility Opening Date'n) ) <= 210

This selects the last 210 days of rows. I'm not sure if you can make a filter that selects on months intelligently that would span years.

 

Sam

View solution in original post

2 REPLIES 2
Sam_SAS
SAS Employee

You could use an advanced filter expression like this:

 

( TreatAs(_Number_, DatePart(Now())) - TreatAs(_Number_, 'Facility Opening Date'n) ) <= 210

This selects the last 210 days of rows. I'm not sure if you can make a filter that selects on months intelligently that would span years.

 

Sam

Kamohelo
Fluorite | Level 6
Hi Sam,

Thank you - It worked.

Kamo

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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