02-05-2016 11:11 AM - edited 02-05-2016 11:14 AM
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?
02-05-2016 11:31 AM
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.
02-05-2016 01:10 PM
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.
02-05-2016 03:03 PM
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.
02-05-2016 03:56 PM
02-05-2016 04:19 PM - edited 02-05-2016 04:21 PM
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.
02-06-2016 10:23 AM
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.