Forum Discussion
rachaelnelson
9 years agoFrequent Visitor
Calculating Average Price Per Ton
I have a table of data that list all product sales. I have a calculated column that calculates the cost / ton. When I put this column in a matrix, each line calculates correctly but when I roll up ...
- 9 years ago
Thank you, Vvelarde. Your measure gave me the same values I was receiving with my current calculated column but it got me thinking and I was able to solve using the following:
cost/ton = CALCULATE(SUM(Table1[COST])/SUM(Table1[Tons]))
Vvelarde
9 years agoCommunity Champion
Hi, use this measure:
AVGCost-Tons = AVERAGEX(Table1,Table1[Cost/Ton])
Regards
Victor
Lima - Peru
rachaelnelson
9 years agoFrequent Visitor
Thank you, Vvelarde. Your measure gave me the same values I was receiving with my current calculated column but it got me thinking and I was able to solve using the following:
cost/ton = CALCULATE(SUM(Table1[COST])/SUM(Table1[Tons]))
- Vvelarde9 years agoCommunity Champion
Yeah, sorry i had a bad read of your problem.
I thought you need 226.83 instead of 232.85.
Regards
Victor
Lima - Peru