Forum Discussion

Sushmach109's avatar
Sushmach109
Helper I
8 years ago
Solved

filling blanks with previous column text

Hi team,   I need to fill the current blanks values with previous row data. I tried but able to find the solution.Can you please try to give Solution.   Colulmn1 A null null B null  null ...
  • v-yulgu-msft's avatar
    8 years ago

    Hi Sushmach109,

     

    Add an index column first.

     

    Create a calculated column with below DAX formula.

    Required Result =
    IF (
        Table_1[Column2] = BLANK (),
        CALCULATE (
            LASTNONBLANK ( Table_1[Column2], 1 ),
            FILTER ( Table_1, Table_1[Index] < EARLIER ( Table_1[Index] ) )
        ),
        Table_1[Column2]
    )

     

    Best regards,

    Yuliana Gu