Forum Discussion

aramirez2's avatar
aramirez2
Icon for Helper I rankHelper I
5 years ago
Solved

Previous working day column

Hi!   I need to create a previous working day column in my calendar table which has the following structure:     WorkingDay column = "1" means that we opened our store and I need for each ...
  • aramirez2's avatar
    aramirez2
    5 years ago

    Thanks amitchandak  but your Work Date Cont column gives today date (Monday) for today record as Previous Work Day. 

     

    I got the solution. Now PrevWorkDay column gives Friday as Previous Work Day for Saturday, Sunday and Monday records.

     

     

     

     

    PreviousWorkDay = 
    var a = Hoja1[Date]
    RETURN CALCULATE(MAX(Hoja1[Date]); FILTER(ALL(Hoja1); Hoja1[Date] < a && Hoja1[WorkingDay] = 1))