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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'd like to create a calculated column that shows running total. I've found plenty of examples for measures, but not columns.
For example, here is the measure. Can you help me convert this to a column?
SalesRolling =
CALCULATE (
SUM ( 'Claims'[CLM_ACTL_PD_AMT] ),
DATESBETWEEN (
'Calendar'[FullDate],
NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Calendar'[FullDate] ) ) ),
LASTDATE ( 'Calendar'[FullDate] )
)
)
Solved! Go to Solution.
This seems to be working:
SalesRolling12M =
CALCULATE (
SUM ( 'Claims'[CLM_ACTL_PD_AMT] ),
ALLEXCEPT ( 'Claims', 'Claims'[MBR_SK] ),
DATESBETWEEN (
'Calendar'[FullDate],
DATEADD ( LASTDATE ( 'Calendar'[FullDate] ), -11, MONTH ),
//Eleven Months Ago
LASTDATE ( 'Calendar'[FullDate] )
)
)This helped me: https://stackoverflow.com/questions/23835611/how-to-sum-a-column-based-on-another-column-in-dax-powe...
Hello @Anonymous ,
If you want runnin total for the current year , you can use the DAX function TOTALYTD.
You can refer here:
https://msdn.microsoft.com/en-us/library/ee634400.aspx
Hope this helps.
Let me know if you need further help.
Nope, I want rolling 12 months, not YTD. Thanks though!
Also, my code isn't working because it's showing the running totals for all members in the table, even when I'm only showing one member. Back to the drawing board.
This seems to be working:
SalesRolling12M =
CALCULATE (
SUM ( 'Claims'[CLM_ACTL_PD_AMT] ),
ALLEXCEPT ( 'Claims', 'Claims'[MBR_SK] ),
DATESBETWEEN (
'Calendar'[FullDate],
DATEADD ( LASTDATE ( 'Calendar'[FullDate] ), -11, MONTH ),
//Eleven Months Ago
LASTDATE ( 'Calendar'[FullDate] )
)
)This helped me: https://stackoverflow.com/questions/23835611/how-to-sum-a-column-based-on-another-column-in-dax-powe...
This seems to work. Let me know if there's a more elegant solution:
SalesRolling12M =
CALCULATE (
SUM ( 'Claims'[CLM_ACTL_PD_AMT] ),
ALL ( 'Claims' ),
DATESBETWEEN (
'Calendar'[FullDate],
DATEADD ( LASTDATE ( 'Calendar'[FullDate] ), -11, MONTH ), //Eleven Months Ago
LASTDATE ( 'Calendar'[FullDate] )
)
)
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 |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 21 | |
| 18 |