Forum Discussion
Calculated Field Formula
Hello All,
I have an excel pivot table which shows for certain jobs what the price, costs and profit are. Our 3rd Party Supplier then gets a 10% commission on jobs that were actually booked.
Not all the jobs that are entered on the system get booked, but the report needs to reflect that.
I have everything sorted in the report, except the calculated field which will have a heading of "Commission".
The Profit field is called "Profit", the Status Field is called "Status" and in the status field the entries are either won, lost or in progress
I want the formula to be an if the Status = won then do profit x 10%, if not show a zero.
I have tried :
=IF(Status="won", SUM(Profit*10%),0)
But for some reason it doesn't recognise the won part and shows zero's for every line.
Any help would be very much appreciated.
Many thanks
Paul
4 Replies
- LorenzoSilver Contributor
Hi wyptaj / Paul
To my knowledge the [Status] field requires Numeric values (not Text ones) for such formula to work in classic Pivot Tables
If you run a Windows version of Excel there's probably a solution with Power Pivot - basic example below and attachedDAX measure for Commission with above Table1 as data source:
=CALCULATE ( SUM ( Table1[Profit] ) * 0.1, FILTER ( Table1, Table1[Status] = "won" ) )- SergeiBaklanDiamond Contributor
My understanding that in cached PivotTable formulae in calculated field don't work with labels, only with value fields.
As workaround you may add calculated item to Status
which gives
Not exactly what is required, some approximation. To be flexible you need to work wit data model.