Forum Discussion

babyjb1979's avatar
babyjb1979
Icon for Helper I rankHelper I
2 years ago
Solved

Fill 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...
  • Anonymous's avatar
    Anonymous
    2 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