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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
tarunbisht20001
Frequent Visitor

Custom row level Total in Matrix

tarunbisht20001_0-1725358261454.png

The client has requested a customization for the total calculations as follows:

  1. Total 1 should be the normal sum of the values.
  2. Total 2 should be calculated as Total 1 plus the sum of the values in the second row.
  3. Total 3 should be Total 2 plus the sum of the values in the third row.
  4. This pattern should continue, with each subsequent total being the previous total plus the sum of the values in the next row.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@tarunbisht20001 , Seem like you want cumulative in subtotal , Assume the lowest level is product name and you are using a measure M1

 

Then

Switch(True() ,

isinscope(Table[Product Name]), [M1],

calculate([M1], filter(allselected(Table), Table[Level2] <= Max(Table2[Level 2])  ) )

)

 

You can consider window function for cumulative too

 

How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

 

Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @tarunbisht20001 

 

This will involve a disconnected table and a lot of DAX. I've attached a sample pbix on how to achieve this. Alternatively, if your client is willing to spend, Inforiver has a custom viz that can custom aggregations as a row or column to a matrix.  https://appsource.microsoft.com/en-us/product/power-bi-visuals/xviz.inforiver-premium?tab=overview 

danextian_0-1725359693252.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
amitchandak
Super User
Super User

@tarunbisht20001 , Seem like you want cumulative in subtotal , Assume the lowest level is product name and you are using a measure M1

 

Then

Switch(True() ,

isinscope(Table[Product Name]), [M1],

calculate([M1], filter(allselected(Table), Table[Level2] <= Max(Table2[Level 2])  ) )

)

 

You can consider window function for cumulative too

 

How to Switch Subtotal and Grand Total in Power BI | Power BI Tutorials| isinscope: https://youtu.be/smhIPw3OkKA

 

Continue to explore Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
https://medium.com/@amitchandak/power-bi-window-function-3d98a5b0e07f

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors