Forum Discussion
warrencowan
Kudo Collector
9 years agoFill in blank values in time series data, based on last value.
Hi everyone I am trying to create time series visuals (matrix and line charts primarly) from a snapshot table. Product have a position for the day, but different products in the table have differ...
- 9 years ago
Hi Warren,
you need to connect your snapshot table to a date table. Then you can use a measure like this:
Last Position= CALCULATE( MAX( SnapshotTable[Position] ) ,LASTNONBLANK( DATESBETWEEN( 'Date'[Date],BLANK(),LASTDATE( 'Date'[Date] ) ) ,CALCULATE( COUNT( SnapshotTable[Position] )) ) )
ImkeF
Community Champion
9 years agoHi Warren,
you need to connect your snapshot table to a date table. Then you can use a measure like this:
Last Position=
CALCULATE( MAX( SnapshotTable[Position] )
,LASTNONBLANK( DATESBETWEEN( 'Date'[Date],BLANK(),LASTDATE( 'Date'[Date] ) )
,CALCULATE( COUNT( SnapshotTable[Position] ))
)
)Anonymous
8 years agoNot applicable
Great DAX, thanks! Follow-up question for you: how do you calculate Number of Product by Position for every date?