Forum Discussion
Anonymous
6 years agoNot applicable
Getting 12 Months Running Total
Hello all, need to create a measure that would return 12 month running total for each month like in screenshot below.
- 6 years ago
Hi Anonymous
Create a measure
Measure = CALCULATE ( SUM ( 'Fact'[Value] ), FILTER ( ALLSELECTED ( 'Fact' ), 'Fact'[related date] <= MAX ( 'Fact'[related date] ) && DATEDIFF ( 'Fact'[related date], MAX ( 'Fact'[related date] ), MONTH ) <= 12 ) )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
6 years agoCommunity Support
Hi Anonymous
Create a measure
Measure =
CALCULATE (
SUM ( 'Fact'[Value] ),
FILTER (
ALLSELECTED ( 'Fact' ),
'Fact'[related date] <= MAX ( 'Fact'[related date] )
&& DATEDIFF ( 'Fact'[related date], MAX ( 'Fact'[related date] ), MONTH ) <= 12
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
Thanks a lot Maggie! That worked fine.