Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

If Date is a Monday then return previous Friday and Exclude Holidays

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 ...
  • lbendlin's avatar
    2 years ago

    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])