Oracle Transactional Business Intelligence

Products Banner

Filter for terminations in prior calendar week



I'm creating a termination report and trying to show which terminations were in the calendar week (Sunday-Saturday) prior from the week when the report was run



I'm trying to create a report that shows which terminations were from the prior calendar week. So far I've only been able to create the below formula to show terms for 1 week prior to current date, but it's calculating the past 7 days, not calendar week. I've tried changing the formula to use CALENDAR WEEK but to no avail. 

CASE  WHEN (("Worker"."Termination Date" IN (timestampadd(SQL_TSI_WEEK,-1,CURRENT_DATE))) OR ("Worker"."Termination Date" IN (CURRENT_DATE))) THEN 'Last Week' ELSE '' END

I would like this to be a value in a column. So for example, if we ran the report today, Thursday September 21st, any employee whose termination date was between Sunday, Sept 10 and Saturday Sept 16 would have the value LAST WEEK, in the column. We would then be able to use that column as a table prompt to show terminations in the last week. We do not want it as a filter on the entire report, because we are using the same analysis criteria to also show terminations by mth and quarter. 

I've attached a screenshot of what we're trying to get to. 

Screen Shot 2017-09-21 at 2.36.26 PM.png