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
babyjb1979
Helper I
2 years agoAnonymous
Hi Liu,
The logic appears to be correct, but please check that the data is still incorrect. Please use new data to test
| ID | Date | Value |
| 1023201 | 9/1/2023 | |
| 1023201 | 9/2/2023 | |
| 1023201 | 9/3/2023 | |
| 1023201 | 9/4/2023 | |
| 1023201 | 9/5/2023 | |
| 1023201 | 9/6/2023 | |
| 1023201 | 9/7/2023 | |
| 1023201 | 9/8/2023 | |
| 1023201 | 9/9/2023 | |
| 1023201 | 9/10/2023 | |
| 1023201 | 9/11/2023 | |
| 1023201 | 9/12/2023 | 12 |
| 1023201 | 9/26/2023 | |
| 1023201 | 9/27/2023 | |
| 1023201 | 9/28/2023 | |
| 1023201 | 9/29/2023 | |
| 1023201 | 9/30/2023 | |
| 1023201 | 10/1/2023 | |
| 1023201 | 10/2/2023 | 7 |
| 221934 | 9/1/2023 | |
| 221934 | 9/2/2023 | |
| 221934 | 9/3/2023 | |
| 221934 | 9/4/2023 | |
| 221934 | 9/5/2023 | 5 |
| 221934 | 9/11/2023 | |
| 221934 | 9/12/2023 | |
| 221934 | 9/13/2023 | |
| 221934 | 9/14/2023 | |
| 221934 | 9/15/2023 | |
| 221934 | 9/16/2023 | |
| 221934 | 9/17/2023 | |
| 221934 | 9/18/2023 | |
| 221934 | 9/19/2023 | |
| 221934 | 9/20/2023 | |
| 221934 | 9/21/2023 | |
| 221934 | 9/22/2023 | |
| 221934 | 9/23/2023 | |
| 221934 | 9/24/2023 | |
| 221934 | 9/25/2023 | |
| 221934 | 9/26/2023 | 16 |
| 246075 | 9/1/2023 | |
| 246075 | 9/2/2023 | |
| 246075 | 9/3/2023 | |
| 246075 | 9/4/2023 | |
| 246075 | 9/5/2023 | |
| 246075 | 9/6/2023 | |
| 246075 | 9/7/2023 | |
| 246075 | 9/8/2023 | |
| 246075 | 9/9/2023 | |
| 246075 | 9/10/2023 | |
| 246075 | 9/11/2023 | |
| 246075 | 9/12/2023 | |
| 246075 | 9/13/2023 | |
| 246075 | 9/14/2023 | 14 |
| 246075 | 9/27/2023 | |
| 246075 | 9/28/2023 | |
| 246075 | 9/29/2023 | |
| 246075 | 9/30/2023 | |
| 246075 | 10/1/2023 | |
| 246075 | 10/2/2023 | |
| 246075 | 10/3/2023 | 7 |