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
ProveluNL
Frequent Visitor

Matrix weighted averages in subtotals and total

Hi,

 

Is there someone who can help me by the following.

 

I have the folowing table:

 

Table: Salesman   
RegionSalesman Sales Budget Margin IndexMargin Budget
AA1        1.000.000,0050        500.000,00
AA2        2.000.000,0060     1.200.000,00
AA3        2.500.000,0055     1.375.000,00
BB1        2.000.000,0060     1.200.000,00
BB2        4.000.000,0045     1.800.000,00
BB3        3.000.000,0055     1.650.000,00
CC1        1.500.000,0055        825.000,00
CC2        2.000.000,0050     1.000.000,00
CC3        6.000.000,0040     2.400.000,00
Total       24.000.000,00   11.950.000,00
Region A AVG Margin Index                55,91 
Region B AVG Margin Index                51,67 
Region C AVG Margin Index                44,47 
Total AVG Margin Index                49,79 

 

And I want to put it in a matrix like the one below:

Subtotals by region and a grand total

1) Sales Budget is a SUM

2) Margin Budget is a Sum

3) Margin Index is a weighted AVERAGE (this is the one I am fighting with !!!!)

 

 

Requested Visual Power BI Matrix  
RegionSalesman Sales Budget Margin IndexMargin Budget
A         5.500.000,0055,91     3.075.000,00
 A1        1.000.000,0050,00        500.000,00
 A2        2.000.000,0060,00     1.200.000,00
 A3        2.500.000,0055,00     1.375.000,00
B         9.000.000,0051,67     4.650.000,00
 B1        2.000.000,0060,00     1.200.000,00
 B2        4.000.000,0045,00     1.800.000,00
 B3        3.000.000,0055,00     1.650.000,00
C         9.500.000,0044,47     4.225.000,00
 C1        1.500.000,0055,00        825.000,00
 C2        2.000.000,0050,00     1.000.000,00
 C3        6.000.000,0040,00     2.400.000,00
Total       24.000.000,0049,79  11.950.000,00

 

 

1 REPLY 1
jbocachica
Resolver II
Resolver II

Hi, this post could be helpful in your case.

 

http://blog.iwco.co/2020/01/14/calculos-ponderados-dax/

 

Regards

John Bocachica
Senior BI Consultant
Information Workers
http://www.iwco.co

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.