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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
CK60
New Member

Matrix Measure showing aggregate value and does not change based on Hierarchy

Hi Everyone,

Please be kind as I am new to power bi.

These are the sample results I am getting , I only included two customers in this example: OrderQTY * AVGCS Rate = Cost

I have the detailed measure definitions below. 

I was expecting the customer costs to roll up and reflect the total plant costs .

The customer  order quantities do sum up correctly to the plant qty

The average does not , but not sure if it would being it would be average of averages.

 

NetworkN1N2N3  
    Order QTYAVG CS RateCost  
       Plant  269877$1.73$468,203.71  
                Cust 1  4226$105.79$447,051.00  
                  Cust 2  8921$50.12 $447,096.240  
      
      

 

I have created a matrix that displays the above .

QTY = sum(orderqty),

Average Rate= This is a measure that consists of summation of different case rates  by department.

then getting the average of the total case rate.

 

Example : Claims CS Rate =

DIVIDE(
CALCULATE( SUM('Dim.HR'[Total Monthly Cost]),FILTER('Dim.HR','Dim.HR'[Department] = "Claims")),
SUM('Fact.Orders'[OrderedQtyInCases]),
0
)
 
After getting CS rates, I then add them up 
CS RT A+CS RT B + CS RT C  = TotalCaseRate
AVG Case RT = TotalCaseRate/3
 
The main issue is that at the plant level , the total cost for this plant is about 470k ,
so even though the row by row calculations seem correct, these customers aggregate costs is way over  the total plant cost.
Being new, I am sure that there is something I am missing.
 There is an indirect relationship between DimHR and FactOrders.. through the DimCalendar .
Maybe the hierarchy is the issue , one customer can be supplied by multiple plants
and one plant can also have multiple networks.
Sorry this is a bit convoluted but is there anyone that can try to point me in the right direction?
 
 
 
1 REPLY 1
Anonymous
Not applicable

Hi @CK60 ,

 

Welcome to the community.

Sorry, still not very clear.

Hope to provide sample data and expected results.

Are you referring to your Rate Cost being miscalculated in the Plant hierarchy? It should be 466887.21 instead of 468203.71.

vstephenmsft_0-1646205123231.png

 

 

How to Get Your Question Answered Quickly - Microsoft Power BI Community

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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