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] ) )
- ayalangel4 years agoFrequent Visitor
Its perfect too, thank very muh for your support!!!
- ayalangel4 years agoFrequent Visitor
fits perfect!!!!, Thank You very much. Just one more question, what would be the logic to take the measure to one year and that the restart is 30 days without values, Thanks in advance.
- tamerj14 years agoCommunity Champion
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.