Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello all,
need to create a measure that would return 12 month running total for each month like in screenshot below.
Solved! Go to Solution.
Hi @Sam02
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.
There is a Running Total quick measure. Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
Thanks for your reply Greg, the quick measure did not worked and I created another one my self using different option both gave me same incorrect result.
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 @Sam02
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.
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
Hi @Sam02
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.
Thanks a lot Maggie! That worked fine.
Link to sample pbix can be found here: