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
jure_rak
Helper I
Helper I

Matrix cumulative row subtotals

Dear all,

 

Could you give me a hint?

 

Below a simple Incom Statement:

 

screenshot.png

 

This means, for the 1st column, MARGIN 2 should be 20.860 - 8.565 = 12.295, MARGIN 3 20.860 - 8.565 - 4613 etc.

 

Thanks,

 

Jiri

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @jure_rak 

 

You can achieve this in the table using DAX, but the measure created won't be able to use in the column in the Matrix.

Let me know if you'd like to get below results:

M1=178

M2=178-3

M3=178-3-7

...

Add below measures:

Measure = IF(MAX('Table'[Index])=0,0,CALCULATE(MAX('Table'[Sales]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)))
Measure 2 = 178-CALCULATE(SUMX('Table',[Measure]),FILTER(ALL('Table'),[Margin]<=MAX('Table'[Margin])))

 

000.PNG

Pbix attached.

Community Support Team _ Dina Ye
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

1 REPLY 1
v-diye-msft
Community Support
Community Support

Hi @jure_rak 

 

You can achieve this in the table using DAX, but the measure created won't be able to use in the column in the Matrix.

Let me know if you'd like to get below results:

M1=178

M2=178-3

M3=178-3-7

...

Add below measures:

Measure = IF(MAX('Table'[Index])=0,0,CALCULATE(MAX('Table'[Sales]),FILTER(ALL('Table'),[Index]=MAX('Table'[Index])-1)))
Measure 2 = 178-CALCULATE(SUMX('Table',[Measure]),FILTER(ALL('Table'),[Margin]<=MAX('Table'[Margin])))

 

000.PNG

Pbix attached.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

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.