Forum Discussion
wlknsn
Helper I
8 years agoFill empty rows/values with previous/last measure or calculated value
Hi, I'm trying to find a DAX solution for a measure or calculated column which basically returns the last measure/calculated value if the cell is empty. This result should not be an aggregation, ...
wlknsn
Helper I
8 years agoAs mentionned before, I need to fill this based on a measure. The power query solution is based on data, and not a measure/calculation. Same for the dax solution, that will not work with measure. It's the last measure that needs to be filled.
Yggdrasill
Responsive Resident
7 years agoI've used this as a calculated column
Fill empty rows =
VAR LastNonBlankDate =
CALCULATE (
LASTNONBLANK ( dimDates[Date]; 1 );
FILTER (
ALL ( dimDates );
dimDates[Date]<= EARLIER ( dimDates[Date] )
&& NOT ( ISBLANK ( dimDates[YourColumnWithBlankRows]) )
)
)
RETURN
CALCULATE (
SUM ( dimDates[YourColumnWithBlankRows] );
FILTER ( ALL ( dimDates ); dimDates[Date] = LastNonBlankDate )
)