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

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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1110 views
  • 0 likes
  • 3 in conversation