Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
86 | |
76 | |
66 |
User | Count |
---|---|
149 | |
117 | |
111 | |
106 | |
95 |