Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Please, I need help.
My raw data contains business days with a single value.
But I need to repeat the latest valid value into weekends and holidays.
Below, Z is what I have, ZZ is what I need. See that the latest value from Friday is copied into Saturday and Sunday.
If there is a holiday midweek, it also needs to copy the latest value.
I cannot use query editor (language M), I need to use DAX.
I am having trouble with some commands such as LASTNONBLANK, EARLIEST, EARLIER.
How should I fix this?
Solved! Go to Solution.
Hello @Anonymous
Here is the solution as a calc colum, please let me know if this works:
ZZ = VAR WeekDays = WEEKDAY ( Table1[Date] ) VAR Logic = IF ( WeekDays IN { 7, 1 }, MAXX ( FILTER ( Table1, Table1[Date] < EARLIER ( Table1[Date] ) ), Table1[Z] ) ) RETURN IF ( WEEKDAY ( Table1[Date] ) IN { 7, 1 }, Logic, Table1[Z] )