Forum Discussion
Anonymous
8 years agoNot applicable
Filter by Last Working Day
I need to be able to apply a slicer for "Today", "Yesterday" and "Older". However, the data is not relevant on weekends so, when today is Monday, I need the report to show Friday's data when the "Ye...
v-jiascu-msft
8 years agoMicrosoft Employee
Hi Anonymous,
Try this formula, please.
Slicer New =
IF (
[Date] > TODAY (),
"NA",
IF (
[Date] = TODAY (),
"Today",
IF (
WEEKDAY ( [Date], 2 ) = 5
&& DATEDIFF ( [Date], TODAY (), DAY ) <= 3
&& DATEDIFF ( [Date], TODAY (), DAY ) > 0,
"Yesterday",
IF ( DATEADD ( 'Date_Lookup'[Date], 1, DAY ) = TODAY (), "Yesterday", "Older" )
)
)
)
Best Regards,
Dale