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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Chewbc
Frequent Visitor

Matrix Table Calculated Sub-Total

Goo day all.

 

I have derived Matrix table as below and managed to have total and grand-total working correctly. How to derive total 3 which is the sum of total 2 & 1 and not from calculated balance from ledger balances. i may need to have sub-total from combination of total from Category.  

 

Infromations:

1) Amount are total derived from monthly posted ledger balances as shown in  Sub-Category2

2) CPDOC-QS is KPI derived from divinding Amount to Quanity Sold

3) All Totals are standard calucaltion functions from within Matrix table

 

2022-08-03_105141.jpg

Hopes my explanation above clear for yoru understanding.

 

THank you. 

6 REPLIES 6
Chewbc
Frequent Visitor

2022-08-03_162621.jpg

Chewbc
Frequent Visitor

2022-08-03_162802.jpg

Chewbc
Frequent Visitor

Hi Sir,

 

The Matrix table above derived from calculated Measures. The measures taken data from posted ledgers and use ledger ac linked to another table structures and calendar.  

amitchandak
Super User
Super User

@Chewbc , Use is in scope and category values

 

if(not(isinscope(Table[Sub Category]) ) && max(Table[Sub Category])  = "12. Total Cost", [Sub Total Meausre], [Measure])

 

TO create a measure you can use like 

sumx(filter(allselected(Table[Category]), Table[Category] in {"Finance Cost", "Selling and Distribution"} ), [Measure])

 

 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

 

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

Hi @amitchandak I managed to get the results based upon DAX syntax suggested (see below). 

2022-08-04_131029.jpg

The AMOUNT and CPDOC-QS for category "12. TOTAL COST (WO BY PRODUCTS" are sum from category 01. to 11. How to force the value Sub-Total and Sub-Total-CPQS to show under AMOUNT and CPDOC-QS column? 

Thanks mate for the reply. Yes I managed to used sumx to correct my intial problem on Grand-Total from matrix table. WIll try your suggestion and post the results here...

 

Thank you. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.