Forum Discussion
aramirez2
Helper I
5 years agoPrevious 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 ...
- 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))
amitchandak
Super User
5 years agoaramirez2 , I think, in the blog I shared I have updated nonworking dates with the last working dates
Work Date Cont = if([Work Day]=0,maxx(FILTER('Date',[Date]<EARLIER([Date]) && [Work Day]<> EARLIER([Work Day]) ),[Date]),[Date])aramirez2
Helper I
5 years agoThanks 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))