Forum Discussion

rachaelnelson's avatar
rachaelnelson
Frequent Visitor
9 years ago
Solved

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 ...
  • rachaelnelson's avatar
    rachaelnelson
    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]))