Margin calculation in pivot

Margin calculation in pivot

Hi,

I'm trying to add an aggregate calculation to a pivot table to calculate margin percentage.

I'm adding the following formula:
sum(("Sales Price" / "Cost Price" - 1) * 100)

This does not seem to be working on aggregated levels.
I have for an example a sales price of 10027 and cost of 9780. The calculation ends up with a result of 87.51 (would expect 2.5).

Are there another solution to do this?