0
votes

I have a report parameters start date and end date both set for previous day. I have report subscription that runs on each day of the week. But, when it executes on Monday, I need to change the Default parameter to run from the Prior Friday's date thru Sunday. How can I achieve this? TIA

1
Welcome to Stack Overflow! In order for us to better help you, please edit your question to create a MCVE.m13op22

1 Answers

1
votes

I just replicated your use case locally.

For your start date parameter you will need expression as below. It will check if today is Friday (Weekday starts from Sunday) then set start date as Friday from last week else previous day. This shall work.

 =IIF(WeekDay(today)=2,DateAdd("d",-3,today),DateAdd("d",-1,today))