Sumif in Pivot Table Query

mart_mrexcel

Active Member
Joined
Aug 23, 2008
Messages
296
Office Version
  1. 365
Platform
  1. Windows
I have a table for Employee promotion and i inserted a pivot table having the total heads for each department. My Query is, How can i add a formula in the pivot to insert a column Promotion YES and Promotion Column and sum the total of YES or NO in each Department.

I tried using "=if([Promote Yes/No]="Yes",sum([Promote Yes/No]),0)" but its an error

(Note: i click the "Add this data to the Data Model" when inserting pivot)

This is the Emp TableThis is the PivotThis is expected ResultThis is expected Result
EmployeeDepartmentPromotion Yes/NoRow LabelsCount of EmployeePromotion YESPromotion No
Emp1HRNoFinance211
Emp2FinanceYesHR202
Emp3HRNoOperation211
Emp4FinanceNoProcurement101
Emp5ProcurementNoGrand Total7
Emp6OperationYes
Emp7OperationNo
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
1695819906563.png
1695819906563.png
 
Upvote 1
Solution
Kindly Refer the above Image.
Putting
Department in Row Field
Promotion in Column Field
and Employee in Value Field
 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,264
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top