It seems an easy task but I can't fugure it out; I want to filter a report from Now() to Now()-7 ; basically the current week's worth of data.
Assuming data in memory with a date and date time available to use.
Can anyone help me on this?
you can use filter tab on the right hand side of your report desinger to filter the data you want to see in the report.
thanks; I was looking foor som preiodic type function; so when the report is refreshed , it only refreshes for the current week; assuming I only have a date and date time available in memory - i.e not having to go back to ETL.
@Explore_SAS wrote:
There is option of function of relative period when you calculate aggregated column, if you want to aggregate something for a relative period, please check if its useful for you.
RelativePeriod operator does not work at the week level, unfortunately.
@Explore_SAS wrote:
Hey sam do you know, how the option of _Inferred_ for grouping period it says that it takes the grouping based on data in the report but it never worked for me.
An issue with _Inferred_ is that it will often use an inferred interval period of "day" for the inner interval but the LASR function does not like to process "day" and so the operator returns missing values in most cases.
If your date data item has a format like MMMYYYY, then _Inferred_ should correctly set the inner interval to "Month".
Personally I always set the interval parameters to the period I want rather than using _Inferred_.
Eventually this should work better than it does right now.
The periodic operators do not handle relative dates correctly when the interval is day. Possibly some day processing was supported in earlier releases but it could return bad results. The operators were changed to always return missing values when the interval is day and there is any offset processing to do. I don't remember whether day processing was enabled in any customer-facing release.
Day interval is still fine for operators like Period that do not calculate a difference between dates.
Answer to your first question is this code used in the filter.
It wil filter out your data for the last 7 days.
If you need the running week then you need a sligtly different code.
Greetings Peter
Hi Peter,
Thanks for the filter. I am interested to know how to filter out the running current week instead of the last 7 days. Do you mind share the text code for filtering out the current week?
Thanks!
Jun
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.