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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ringovski
Helper II
Helper II

Matrix Table Static Sub Totals

Hi All,

I would like to add a row to matrix table thats shows the total Value$ for each column which ignores any product code number filter selected. So you can compare the sum of selected codes numbers against the total of all the product codes no matter which product codes you select. 

 

All data is in one fact table, there a dimension table for each SK with unique values.

 

Table name Export_Fact_Codes_All

 

calendar_sk country_sk loading_sk discharge_sk product_code_sk state_sk quantity_sk value$
30010016001211 4001 328967  
30010116011212 600 84353905  
30010226031212 800 41839
30110016001212 900 12888454  
30110126011213 1000 27880729  
30110226021213 200 230237  

 

Current Matrix Table

 

Year

Product_Code

  2005

  Value$

  2006

  Value$

121  
         country1001328967 12888454 
         country10184353905 27880729 
         country10241839  230237
         Total85724711 40999420  
       Total_All_Product_Codes   xxxxxxxx  xxxxxxxx  

 

As per normal behaviour the sub totals changes when I select different product codes. However I would like the sum of the value$ for all products no matter what i select in product_code silcer (Dim_Product_Code), Total_All_Product_Codes.

 

I've tried a new column in the fact table;

Total = IF(ISINSCOPE(Dim_Product_Code[product_code]),

                          SUM(Export_Fact_Codes_All[value$]),

                         CALCULATE(SUM(Export_Fact_Codes_All[value$]),All(Export_Fact_Codes_All)

                     )

               )

 Measure;

Total = CALCULATE(SUM(Export_Fact_Codes_All[value$]),All(Export_Fact_Codes_All)

 

Hopefully this is clear, Thanks for any assistance.

 

1 ACCEPTED SOLUTION

@ringovski I hope this helps you. Thank You.

compare Total Value =
CALCULATE([Total Value],ALL('Table A'))

Mahesh0016_0-1693906562189.png

 

View solution in original post

3 REPLIES 3
Mahesh0016
Super User
Super User

@ringovski Please can you share your Expected results in a table? Thank You. 

Hopefully this is enough information and clear. It's the same as Values 'show on rows' option but only for one measures the Total_All_Product_Codes.

 

Matrix Table, my expected results is the total sum of all product codes in the last row without any filters being applied as 'Total_All_Product_Codes'.

 

Year

Product_Code

  2005

  Value$

  2006

  Value$

121  
         country1001328967 12888454 
         country10184353905 27880729 
         country10241839  230237
         Total85724711 40999420  
       Total_All_Product_Codes   xxxxxxxx  xxxxxxxx  

 

I have the expected result in a measure however it appears as column and repeats for every row. So obviously not right.

 

Total_All_Product_Codes = Calculate(SUM(Export_Fact_Codes_All[value$]),                           

                                 ALL(Dim_Product_Code)

                                ))

@ringovski I hope this helps you. Thank You.

compare Total Value =
CALCULATE([Total Value],ALL('Table A'))

Mahesh0016_0-1693906562189.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.