Forum Discussion
NewbieJono
Post Partisan
3 years agoLast Working Day as filter default
Hello all, i have a filter which using a calculated column returns "today" so I can default my slicer. i would like to do something similar that shows "last working Day" for the last working day. also any future dates leave blank.
here is the code I used for "today", I woulder if I can be changed to suit
Last Working Dat =
VAR _max =
MAXX (
FILTER (
'DIM - Date Table',
'DIM - Date Table'[Date] <= TODAY ()
&& 'DIM - Date Table'[IsWorkingDay] = 1
),
'DIM - Date Table'[Date]
)
RETURN
SWITCH ( TRUE (), [Date] = _max, "Today", FORMAT ( [Date], "DD/MM/YYYY" ) )No RepliesBe the first to reply