Forum Discussion

jdata's avatar
jdata
Frequent Visitor
9 years ago
Solved

Filling Data Gaps, Conditionally

  Hi, I have a table that looks like the one below.  One of the data columns has some blanks that I would like to fill.  How can I fill downward, but only when the identifier (first column) of the '...
  • Vvelarde's avatar
    9 years ago

    jdata

     

    A Dax solution .

     

    Would be a new calculated column:

     

    NewD =
    IF (
        Table1[D] = BLANK (),
        CALCULATE (
            LASTNONBLANK ( Table1[D], Table1[D] ),
            FILTER ( ALLEXCEPT ( Table1, Table1[A ] ), Table1[B] <= EARLIER ( Table1[B] ) )
        ),
        Table1[D]
    )

     

    The Columns Are A,B,C,D in the order of your sample data..