Depends on whether your company works on a Saturday, but one of these SSRS Expressions will do the trick:
Basically WEEKDAY() will return the day number of the week, which will return:
– Sunday = 1
– Monday = 2
– etc.
(Doesn’t matter which Language (e.g. en-GB, etc.) you’ve set in the report)
So if you would like to select the previous workday (including Saturdays):
=IIF(WEEKDAY(TODAY())=2,
DATEADD("d",-CINT(WEEKDAY(TODAY())),TODAY()),
DATEADD("d",-1,TODAY())
)
‘In case it’s Monday, select Today’s date minus 2 days. Otherwise return yesterday’
If you would like to exclude the entire weekend:
=IIF(WEEKDAY(TODAY())=1 OR WEEKDAY(TODAY())=2,
DATEADD("d",-CINT(WEEKDAY(TODAY()))-1,TODAY()),
DATEADD("d",-1,TODAY())
)