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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Matjo
Advocate I
Advocate I

Cumulative sum of columns in matrix

Hi, 

I am trying to get a cumulative sum of a measure in a matrix: 
Kumultaiv summa.jpg

For each month I have a revenue amount, invoice amount and the difference between them. 
I would like to add a measure that is the cumulative sum of the columns (which is by date) 
The C_diff would be by company and month:
A: -849, -1698, -2447

B: 15000, 15000, 10000
C: -3134, 41012 ,37878

 

I hava a Calender[Date] that act as a date dimension. 

I have tried Calculate with filter but it cant get it working and still have the sum filtered on the different companies. 

Best regards,
Mattias

3 REPLIES 3
Greg_Deckler
Super User
Super User

Use the Running Total Quick Measure.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I was not even aware that this existed and had to mark a checkbox in Options/Preview features to see it. There I also found some other very interesting features. 

 

The problem is still the same. The running total is per row. I want the running total to be per column over time, but still filtered by each row. I want the running total over date/ presented for each row. 


Best regards,
Mattias

Maybe I expressed myself badly. I want the cumulative sum to be per company (i e per row) 

 

Here is an example file with a small dataset: DOWNLOAD.  I would like to have it per month. 

This is how it works now which is not how I want it. 

 

Sum per column.jpg

 
The result I want is the following: 

Company, Jan, Feb, March (running total)

A: -100, 0, -100
B: -200, -400, 0

C: 0, -50, 0

 

Best regards,
Mattias

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.