I am trying to filter and display the tickets that are 6 months or older since the date those tickets were opened. Any ideas how to do this? Any help would be appreciated!
I believe this should be possible but a bit annoying to do.
You can perform math on dates by using the TreatAs operator and remembering that the date values are the number of days since 01JAN1960 (in this case, we don't care when day zero was.)
You can use an expression like this to determine the 'age' of a date value:
TreatAs(_Number_, DatePart(Now())) - TreatAs(_Number_, 'Facility Opening Date'n)
Then you could compare this number to 180 to approximate a six month cutoff.
So your advanced filter expression would look something like this:
( TreatAs(_Number_, DatePart(Now())) - TreatAs(_Number_, 'Facility Opening Date'n) ) >= 180
Let us know if that works,
It's a bit unusual that your data item has parentheses in the name. I'm not sure if that could be an issue, or possibly the Opened At column is a datetime value, in which case wrapping in the DatePart() operator should yield the desired result.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.