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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Lucky_Zia
New Member

Incorrect Total Calculation in nested measures

Hi,

I have the following measure that is doing wrong calculation

 

 

SummerizeConsumption =
VAR _Table = SUMMARIZE('Chips Consuption Query','Chips Consuption Query'[Component.Component Level 01.Key])
RETURN SUMX(_Table,[Consumption])

 

 

here measure formula for [Consumption]

 

 

[Consumption]=
var Val1 = CALCULATE(SUMX(
VALUES('Parent Consumption Query'[Component.Component Level 01.Key]), IF('Parent Consumption Query'[Component.Component Level 01.Key] IN { "P1","P2","P3","P4","P5" }, 'Parent Consumption Query'[Parent Issue Stock Qty.]) ))
var val2 = CALCULATE(SUMX(
VALUES('Parent Production Query'[Material.Material Level 01.Key]), IF('Parent Production Query'[Material.Material Level 01.Key] IN { "P1","P2","P3","P4","P5" }, 'Parent Production Query'[Parent Production Qty.]) ))
RETURN DIVIDE(Val1,val2)
'Parent Consumption Query'[Parent Issue Stock Qty.]= SUM('Parent Consumption Query'[Issue Total Stock])
'Parent Production Query'[Parent Production Qty.] =SUM('Parent Production Query'[Activity quantity])

 

 

My issue is that SummerizeConsumption is not calculating total correctly as shown below

Capture 1.JPG

 

 

 

1 REPLY 1
_Moosa
New Member

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors