BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello All,
I am running into an issue when I try to report all the activity for the previous month. There are 2 issues my month is not the same as the calendar month(meaning the a school_month can span between 2 calendar months) I have a table which gives me the start date and end date for each school_month with the month_number. I also have a column where I can check what the current school month is, but I am not able to filter on the data for the previous month. Here is how the data is


m_start_date m_end_date s_month curr_s_month
8/25/09 9/22/09 1
9/23/09 10/22/09 2


4/15/10 5/12/10 8
5/13/10 6/10/10 9 9 ( because today's date falls in this range)

and I want to display all records for
s_month=8 until cur_month = 9 and
s_month = 9 when cur_month = 10

Is this even possible......

I appreciate any input you have. And thanks to all of you I have been able to use SAS in a much more efficient way.

Thanks
Shri
2 REPLIES 2
AngelaHall
SAS Employee
Shri,
Within the IMAP Filter creation screen, after selecting s_month = 8, click 'Add', then select cur_month < 9, then click 'Add'. You will then have both criteria within a single filter available for use. (You can view the filter expression by clicking the '+' to expand that area of the filter screen.)

~ Angela
http://sas-bi.blogspot.com
jplarios
Quartz | Level 8
Shri,

What we do is have attributes on the dimension loaded during ETL- this might be more helpful when dealing with non-standard dates.
In the dimension in question, the attribute could be called Current Month and the value at the current month will always be "Current Month". The Previous value would be called " Previous Month".
With this you could schedule your reports to WHERE Current = " "Previous Month".

You might need to proc format to sort.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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