Forum Discussion
MarceloSaez
Helper I
6 years agoFill 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: ...
- 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.
Icey
Community Support
6 years agoHi 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.
MarceloSaez
Helper I
6 years agoThanks a lot! It worked!
Best regards!