Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello, I am looking for some help on a calculation I am doing. I just need help calculating the previous day excluding weekends and holidays. I have a date table setup with the holidays and weekends already mapped and I was using a calculation to get the previous day excluding weekends, but I do not know how to also configure it to skip holidays. Any help would be appreciated. Here is the calc I am currently using from another post.
_PreviousDay =
VAR _Date =
dimDate[Date]
VAR _latestDate = _Date - 1
VAR _DD =
SWITCH (
WEEKDAY ( _Date ),
2, _Date - 3,
1, _Date - 2,
7, _Date - 1,
_latestDate
)
RETURN
_DD
Solved! Go to Solution.
You posted this in the Power Query board. Do you want the result in Power Query or in DAX?
_PreviousDay =
VAR _Date =
[Date]
RETURN MAXX(FILTER(dimDate,[Date]<_Date && [Holiday Or Weekend]=FALSE()),[Date])
You posted this in the Power Query board. Do you want the result in Power Query or in DAX?
_PreviousDay =
VAR _Date =
[Date]
RETURN MAXX(FILTER(dimDate,[Date]<_Date && [Holiday Or Weekend]=FALSE()),[Date])