Forum Discussion
babyjb1979
Helper I
2 years agoFill up gaps with duplicate date
Hi Power Bi Gurus, I have a table with date and value, I am using the DAX code to fill up the gaps as following: New Value = VAR LastNonBlankDate = CALCULATE ( FIRSTNONBLANK ( Ta...
- Anonymous2 years ago
Hi babyjb1979 ,
Here are the steps you can follow:
1. Create measure.
Measure = IF( MAX('Table'[Value]) =BLANK(), MINX( FILTER(ALL('Table'), 'Table'[ID]=MAX('Table'[ID])&&'Table'[Date]>MAX('Table'[Date])&&'Table'[Value]<>BLANK()),[Value]), MAX('Table'[Value]))2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
_elbpower
Resolver III
2 years agoWould you like to address gaps in your data by inserting missing dates and updating the value column with the most recent non-blank value? For instance, if there's a missing date like 1/3/2023, would you want to create a new row with that date and a value of 6 copied from the previous date?
babyjb1979
Helper I
2 years agoI want to fill up the blank with the lastest non-blank value