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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NoordenNL076
Regular Visitor

Calculating over average instead of row value

Hello,

 

I'm trying to calculate the total volume of a product by multiplying the volume of that product * quantity. The problem is that it is calculating the volume over the total average of all products, instead of the adequate volume. Here is my measure with an example:

 

Max cap. over period cm3 = AVERAGE('Dimensions per material'[Volume])*'Calculations'[New Max QTY]
 
Example:
 
Correct calculation would be
Product 1
New Max QTY = 120
Volume of product 1: 3015.375
 
120 * 3015.375 = 361,845
 
The only constraint is that part of the product ID is the material ID. It is referencing to the Material ID, as multiple product ID's can have the same Material ID thus having the same volume.
 
I'm sure the problem could be easy to solve but I don't have a lot of Power BI experience. 
 
Thank you!
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could try

Max cap. over period cm3 = AVERAGEX('Dimensions per material', 
'Dimensions per material'[Volume]*'Calculations'[New Max QTY] )

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You could try

Max cap. over period cm3 = AVERAGEX('Dimensions per material', 
'Dimensions per material'[Volume]*'Calculations'[New Max QTY] )

Thank you, John. It worked 🤘

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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