2 Replies Latest reply on Jun 12, 2012 6:24 AM by kathryn.chrismer

# Exclude Sat-Sun from day-over-day calculation?

Does anyone know how to edit this formula to exclude Saturday and Sunday?

Right now it shows me yesterday and the same day last week, but I'd like to exclude Saturdays and Sundays. So, if this report is being shown on a monday it would show Friday and the previous Friday instead of Sunday and the previous Sunday.

if([Calendar Date]=Today()-1) Then "Yesterday"

elseif([Calendar Date]=Today()-8) Then "Last Week"

Else "Ignore"

End

Thanks for any help!

• ###### 1. Re: Exclude Sat-Sun from day-over-day calculation?

Hi Kathryn,

By creating a calculated field similar to the following should give the desired outcome:

if datepart('weekday', today())=2 and

([Calendar Date]=Today()-3) Then "Last Friday"

elseif datepart('weekday', today())>2 and ([Calendar Date]=today()-1) then 'Yesterday'

elseif datepart('weekday', today())=2 and([Calendar Date]=Today()-10) Then "Last Week"

elseif datepart('weekday', today())>2 and ([Calendar Date]=today()-8) then "Last Week"

else "Ignore"

End

Hope this helps!

-Tracy

• ###### 2. Re: Exclude Sat-Sun from day-over-day calculation?

Thanks Tracy! That worked perfectly.