Forum Discussion
restart measure
- 4 years ago
Hi ayalangel
It is the same approach. You just need to aggregation column following the aggregation level in the table visual. For example if you are aggregating at month level you need to iterate over the VALUES ( TableName[Year Month Number] ) If you don;t have this column in your table/Date table you can easily create it (Year Month Numbe "Calculated Column" = YEAR ( [Date] ) * 100 + MONTH ( [Date] ) will be just perfect for this application). Please refer to attached sample file.For quarter or year level just follow the same.
Hi Syndicate_Admin and ayalangel
Assuming the original measure is [Measure] and the column that contains the day number TableName[day] then you can create a new measure based on the old one and use it in the visual
NewMeasure =
VAR T1 =
ADDCOLUMNS ( VALUES ( TableName[day] ), "@Value", [Measure] )
VAR T2 =
FILTER ( T1, [@Value] = 0 )
VAR Last0Day =
MAXX ( T2, [day] )
VAR T3 =
FILTER ( T1, [day] > Last0Day )
RETURN
IF ( HASONEVALUE ( TableName[day] ), [Measure], SUMX ( T3, [@Value] ) )
Its perfect too, thank very muh for your support!!!