Forum Discussion
Getting 12 Months Running Total
- 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.
following measure gives me Running total for continious period of time, Can some one help me to modify it for getting running total upto last 12 months only?
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.
- Anonymous6 years agoNot applicable
Thanks a lot Maggie! That worked fine.
- Anonymous6 years agoNot applicable
Hi Meggie, I was wondering if it is possible so the values for 2019 only and mabke it blank to others years in the past?
I need to get one line chart start at 2019 like in Screenshot below.
TIA,
Sam
- v-juanli-msft6 years agoCommunity Support
Hi Anonymous
How about this?
Measure = IF(YEAR(MAX('Fact'[related date]))=YEAR(Today()), 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.