'Conditional calculation in Pivot table calculated field in Excel

I have a column by the name 'NPS' in Excel sheet table. This columns has values as 'Promoter', 'Detractors' and 'Passives'. I want to create a 'Calculated Field' in Pivot that will give me the % of Promoters (Total Promoters/Total Count) minus % of Detractors(Total Defractors/Total Count). Below is a sample image of the data.

Total Count = 12 , Total Promoters = 4 , Total Detractors = 5

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source