Forum Discussion

MarceloSaez's avatar
MarceloSaez
Icon for Helper I rankHelper I
6 years ago
Solved

Fill blanks based in two conditions

Hello Everybody. I'm new to Power BI and I'm trying to fill blanks, but I haven't found a solution in this forum that exactly matches my specific problem. I hope the following clarifies the problem: ...
  • Icey's avatar
    6 years ago

    Hi MarceloSaez ,

     

    How about this?

     

    Column =
    VAR FirstnotblankIndex =
        CALCULATE (
            MIN ( 'Table'[Index] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Status] <> BLANK ()
                    && 'Table'[Well] = EARLIER ( 'Table'[Well] )
                    && 'Table'[Index] <= EARLIER ( 'Table'[Index] )
            )
        )
    VAR FirstnotblankStatus =
        CALCULATE (
            MIN ( 'Table'[Status] ),
            FILTER (
                ALL ( 'Table' ),
                'Table'[Status] <> BLANK ()
                    && 'Table'[Well] = EARLIER ( 'Table'[Well] )
                    && 'Table'[Index] <= EARLIER ( 'Table'[Index] )
            )
        )
    RETURN
        IF ( 'Table'[Index] >= FirstnotblankIndex, FirstnotblankStatus )
    
    

     

     

    BTW, .pbix file attached.

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.