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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All, Need help in Creating the Running Total for the Last 12 Months .
Like 3,5,6,9,12,14,18,20,21,23
I have created below code but it is not working
Am not able to use the ALL function to Remove Filter from for Table Expression i.e. Last12Months Variable from Result Variable
Hi,
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Person count: =
COUNTROWS( VALUES(Data[Person]) )
Expected result measure: =
VAR _slicerselect =
MAX ( 'Slicer table'[Month-Year sort] )
VAR _lasttwelvemonths =
SUMMARIZE (
FILTER (
ALL ( 'Calendar' ),
'Calendar'[Date] <= EOMONTH ( _slicerselect, 0 )
&& 'Calendar'[Date] > EOMONTH ( _slicerselect, -12 )
),
'Calendar'[Month-Year],
'Calendar'[Month-Year sort]
)
VAR _result =
CALCULATE (
SUMX ( VALUES ( 'Calendar'[Month-Year sort] ), [Person count:] ),
WINDOW (
1,
ABS,
0,
REL,
_lasttwelvemonths,
ORDERBY ( 'Calendar'[Month-Year sort], ASC )
)
)
RETURN
_result
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 15 | |
| 13 | |
| 13 |