BookmarkSubscribeRSS Feed
2 REPLIES 2
ballardw
Super User

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.

mkeintz
PROC Star

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?

 

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 628 views
  • 0 likes
  • 3 in conversation