Forum Discussion
ricardocamargos
8 years agoContinued Contributor
Replicate last values
Hi there, Does anyone know how to replicate the last value for a non-existing rows ? For example: I have values for the day 1/1/2018 / 1/2/2018 / 1/4/2018... In this case I don't have va...
Zubair_Muhammad
8 years agoCommunity Champion
One approach might be to create a Calculated Table with Missing Dates and Values
From the Modelling Tab>>>NEW TABLE
New Table =
ADDCOLUMNS (
GENERATESERIES ( MIN ( TableName[Date] ), MAX ( TableName[Date] ) ),
"Values",
VAR Maxdate =
CALCULATE (
MAX ( TableName[Date] ),
FILTER ( TableName, TableName[Date] <= EARLIER ( [Value] ) )
)
RETURN
CALCULATE ( SUM ( TableName[Value] ), TableName[Date] = Maxdate )
)Zubair_Muhammad
8 years agoCommunity Champion