Forum Discussion
NoordenNL076
4 years agoRegular 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!
You could try
Max cap. over period cm3 = AVERAGEX('Dimensions per material', 'Dimensions per material'[Volume]*'Calculations'[New Max QTY] )
2 Replies
- johnt75
Super User
You could try
Max cap. over period cm3 = AVERAGEX('Dimensions per material', 'Dimensions per material'[Volume]*'Calculations'[New Max QTY] )- NoordenNL076Regular Visitor
Thank you, John. It worked 🤘