Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello everyone,
I know, yet another post on Cumulative Total, but for the life of me I can't figure out how to make it work using the existing posts.
Sooo, I have two tables:
I have this measure:
Account | Amount | % of Total | Cumulative Amount |
Apples | 1000 | 45% | 1000 |
Pears | 700 | 32% | 1700 |
Oranges | 500 | 23% | 2200 |
TOTAL | 2200 | 100% |
Can anyone help, please?
Thank you,
Alice
Solved! Go to Solution.
Hi @AliceW ,
You can use the CUMULATIVE_SUM function to calculate the cumulative sum of a measure. Here is an example of how you can use it:
Cumulative Amount =
CALCULATE (
SUM ( 'Opps'[Amount] ),
FILTER (
ALL ( 'Accounts' ),
'Accounts'[Account] <= MAX ( 'Accounts'[Account] )
)
)
This measure will calculate the cumulative sum of the Amount column from the Opps table for each row in the Accounts table, based on the Account column.
You can then use this measure in a pivot table or matrix visualization to display the cumulative amount for each account, like this:
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, Henryk!!
Hi @AliceW ,
You can use the CUMULATIVE_SUM function to calculate the cumulative sum of a measure. Here is an example of how you can use it:
Cumulative Amount =
CALCULATE (
SUM ( 'Opps'[Amount] ),
FILTER (
ALL ( 'Accounts' ),
'Accounts'[Account] <= MAX ( 'Accounts'[Account] )
)
)
This measure will calculate the cumulative sum of the Amount column from the Opps table for each row in the Accounts table, based on the Account column.
You can then use this measure in a pivot table or matrix visualization to display the cumulative amount for each account, like this:
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
78 | |
59 | |
51 |
User | Count |
---|---|
165 | |
83 | |
68 | |
68 | |
59 |