r.activdate <= intnx('days', "&datepmt."d, -90)
It is asking for 90 days and nothing related to "weeks".
Week can have multiple definitions as to start day of the week, how the transition across calendar years gets treated and such.
Look at the WEEK function documentation and the U, V and W descriptor options for example.
Without knowing which definition you use can't say. Also I see nothing that bears on a "week ending" to clarify.
You could have ANY number of days, given that you restrict activdate to
and r.activdate <= intnx('days', "&datepmt."d, -90)
This puts a ceiling on acceptable activdate values, but no minimum.
Now, you could find the minimum activdate found in the data, so you would know the number of possible date values. But you would als have to know the maximum date value found to get the RANGE. And do a frequency of activdate to get the actual NUMBER of unique date values.
So what do you actually want?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.