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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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