Hello to everyone
I have following req for the the report scheduling based on Order_Date
1) If it is Monday then report should run on previous 3 days. (ie. Friday, Saturday & Sunday)
2) If it is any of week days from Tues--Friday then report should run for the previous day.
How can filter this report based on Order_date????
Do i need to create calculation in Model, which i can use in report to reflect these req's.
OR
What should i use in filter in Repotstudio to make report run according to requirements.
i have created following filter, but it does not work.
*******************************************************
CASE WHEN (_day_of_week (current_date,1)= 1)
THEN
(
[Order Create Date]
between
( _add_days ( current_date,-3) )
and
( _add_days ( current_date,-1) )
)
WHEN ( _day_of_week (current_date,1)= 2)
THEN
(
[Order Create Date]= ( _add_days ( current_date,-1) )
)
WHEN ( _day_of_week (current_date,1)= 3)
THEN
(
[Order Create Date]= ( _add_days ( current_date,-1) )
)
WHEN ( _day_of_week (current_date,1)= 4)
THEN
(
[Order Create Date]= ( _add_days ( current_date,-1) )
)
WHEN ( _day_of_week (current_date,1)= 5)
THEN
(
[Order Create Date]= ( _add_days ( current_date,-1) )
)
END
*******************************************************
Please give me guidance for this??
Regards
Charelyjp
Very briefly I would have approached this differently.
I would just create two filters
filter 1 - sale day_of_week = 1 and order create date between stated values
filter 2 - sale date of week between 2 and 5 and order create date = current_date less one day
Put IanHunter's suggested conditions in a single RS filter connected by an OR, or they will be ANDed and never return anything. If still having a problem more details on "does not work" please.
Yes, Very sorry. What a stupid suggestion I made. I can't quite believe I said that.
Geez mate, don't be so hard on yourself. Your suggestion wasn't stupid, probably just hasty, and we should all have a nickel for every one of those we've made...