Pivot Table & Calculated Fields?

thaatrain

New Member
Joined
Mar 5, 2012
Messages
13
Hi everyone,

Apologies if my question has been posted or solved before, however I could not find so here I go.

I have a series of HR headcount data, which contains various columns of 1's and 0's.

I am trying to figure out turnover or attrition, but I would like to calculate this within a pivot table itself, which therefore means I probably need a calculated to to sum up 2 desired columns and then divide the sum by the sum of the other column to arrive at a %tage.

I have attached a very basic example of what the background data looks like, hopefully it helps.

How do I sum up the totals of column C, separately sum up the the totals of column B, then divide the total of column B, by that of column C?

Column AColumn BColumn C
NameHeadcount JulyTurnover (leaver) July
Employee 110
Employee 210
Employee 310
Employee 410
Employee 501
Employee 610
Employee 701
Employee 810
Employee 901
Employee 1010
Employee 1110
Employee 1210
Employee 1310
Employee 1410
Employee 1501

<tbody>
</tbody>

<tbody>
</tbody>

:confused:
Thanks in advance,

A.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Quick question. Is the turnover rate in this example 36.36% or 4 turnovers / 11 Headcount?
 
Upvote 0
What you could do is add an additional column to your table and call it something like "Summary" and you'll want to repeat that word "Summary" for every employee that gets counted.

Next step would be for you to create your pivot table off of those three columns, such that when you create it you'll drop "Summary" into Rows and your "Headcount MMM" and "Turnover (leaver) MMM" into Values. Now you should see "Summary" with Headcounts and Turnovers all in the same line.

Lastly, click on your Pivot table (anywhere) and then select Analyze tab and select Fields, Items & Sets under Calculations. Select Calculated Field and then call it something like TurnoverRate. Your Formula will be ='Turnover (leaver) July'/'Headcount July'.

That will get where you need to be.
 
Upvote 0
What you could do is add an additional column to your table and call it something like "Summary" and you'll want to repeat that word "Summary" for every employee that gets counted.

Next step would be for you to create your pivot table off of those three columns, such that when you create it you'll drop "Summary" into Rows and your "Headcount MMM" and "Turnover (leaver) MMM" into Values. Now you should see "Summary" with Headcounts and Turnovers all in the same line.

Lastly, click on your Pivot table (anywhere) and then select Analyze tab and select Fields, Items & Sets under Calculations. Select Calculated Field and then call it something like TurnoverRate. Your Formula will be ='Turnover (leaver) July'/'Headcount July'.

That will get where you need to be.

Hi,
Thanks for you reply. I'm not sure I understand or explained myself properly.

Below is a mock up of my data.

I would need to sum up the corresponding Year-On-Year totals then divide one by the other. I.e. Formula =Sum(Turnover phasing Jun-17)/sum(headcount Phasing Jun-18).

So on and so forth.

Is that possible in a pivot table calculated field?

Thanks for any help you can provide.

A.
Headcount PhasingTurnover Phasing
NameJun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17Jan-18Feb-18Mar-18Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19Jun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17Jan-18Feb-18Mar-18Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19
Employee 111111110000000000000000000000001000000000000000000
Employee 211111000000000000000000000000010000000000000000000
Employee 311111000000000000000000000000010000000000000000000
Employee 411111000000000000000000000000100000000000000000000
Employee 511100000000000000000000000001000000000000000000000
Employee 611000000000000000000000000010000000000000000000000
Employee 711100000000000000000000000010000000000000000000000
Employee 811000000000000000000000000100000000000000000000000
Employee 910000000000000000000000000100000000000000000000000

<colgroup><col><col span="50"></colgroup><tbody>
</tbody>
 
Upvote 0
Create a copy of your Dates row (which is the same for Turnover & Headcount)
Sum All of your month columns from headcount ie =SUM(B3:B11) copy across until Jun-19
Sum All of your month columns from turnover ie =SUM(AB3:AB11) copy across until Jun-19

Then use =IFERROR(B15/B14,"") to get your "Formula =Sum(Turnover phasing Jun-17)/sum(headcount Phasing Jun-17)"

Then Click in this table that you have just made and create pivot from that, change Column headers names etc.

I recommend converting your original data into a table so that it updates your pivot.

https://docs.google.com/spreadsheet...Zu-MW-V3FbyXeZ9vdNCS7zP3fI/edit#gid=927044583
 
Upvote 0
Oh thanks for this but I'm not sure it'll work for my real data set as my headcount and turnover data are not only captured by employee, but the employees are tagged geographically and functionally, & also type of turnover (voluntary/involuntary) so ideally I would want to pivot those by using calculated fields rather than external formulas.

I will also want to add pivot charts, so the pivot will only show what I have drilled to on slicer, rather than everything.

Please see below.

Personal DetailsGender BalancePosition DetailsHeadcount PhasingTurnover Counting
Employee IDPreferred Name (if different)GenderJob TitleBusiness UnitPhysical LocationContract StatusEmployee TypeGlobal Job BandJun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17Jan-18Feb-18Mar-18Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19Jun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17Jan-18Feb-18Mar-18Apr-18May-18Jun-18Jul-18Aug-18Sep-18Oct-18Nov-18Dec-18Jan-19Feb-19Mar-19Apr-19May-19Jun-19
1000001Mike TysonFBusiness Support SpecialistAmericas ClusterUS PermanentLocalA11111100000000000000000000000001000000000000000000
1000002Donald TrumpFOffice Services ManagerAmericas ClusterUS PermanentLocalB11111111000000000000000000000000010000000000000000
1000003Michael JordanFPricing & Promotion MgrAmericas ClusterUS PermanentLocalB11111111100000000000000000000000001000000000000000
1000004Teresa MayFSr. Brand Mgr.BU Domestic - USUS PermanentLocalD11111111111000000000000000000000000010000000000000

<colgroup><col><col><col><col><col span="3"><col><col span="51"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,380
Members
448,955
Latest member
BatCoder

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