Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
AliceW
Power Participant
Power Participant

Cumulative Total per Account

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:

  • Accounts (one line per Account)
  • Opps (1 Account can have 0, 1, or more Opps)

I have this measure:

Amount = calculate(sum('Opps'[Amount]))
 
I then created
% of total =
divide(
[Amount],
calculate(
[Amount],
ALLSELECTED('Accounts')
)
)
 
What I can't get is the Cumulative Amount... Like this:
 
AccountAmount% of TotalCumulative Amount
Apples100045%1000
Pears70032%1700
Oranges50023%2200
TOTAL2200100% 
 

Can anyone help, please?

Thank you,

Alice

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

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:

vhenrykmstf_0-1671181977751.png


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.

View solution in original post

2 REPLIES 2
AliceW
Power Participant
Power Participant

Thank you, Henryk!!

v-henryk-mstf
Community Support
Community Support

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:

vhenrykmstf_0-1671181977751.png


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.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.