Pivot table - show as % of another sub-total

meileetan

Board Regular
Joined
Aug 18, 2005
Messages
86
My pivot table displays employee names in rows. I added in Capacity and Demand columns, and also their sub-status of Operational, Confirmed or Provisional. The Capacity column will only have "Confirmed" status. Is there a way to display the values as a % of the Capacity sub-total, i.e. over 14 in this example?
1641362239175.png
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
1641409275943.png

you can do a value field setting for each. in the example above i was doing it to the demand total column.
 
Upvote 0
View attachment 54510
you can do a value field setting for each. in the example above i was doing it to the demand total column.
"Operational", "Confirmed", "Provisional" are not base fields but the values of the field "Status".
How did you get "14" to appear in the base item?

I'm attaching a sample of the source data, if this helps.
Book1
ABCD
1Person Demand/CapacityStatusDays
2ACapacityConfirmed14
3BCapacityConfirmed14
4CCapacityConfirmed14
5DCapacityConfirmed14
6ECapacityConfirmed14
7FCapacityConfirmed14
8GCapacityConfirmed14
9HCapacityConfirmed14
10ICapacityConfirmed14
11ADemandConfirmed0.55
12BDemandConfirmed5.4
13CDemandConfirmed16.2
14DDemandConfirmed3.8
15EDemandConfirmed13.5
16FDemandConfirmed18.8
17GDemandConfirmed10.2
18HDemandConfirmed0
19IDemandConfirmed3.5
20ADemandProvisional8.2
21BDemandProvisional0
22CDemandProvisional0
23DDemandProvisional0
24EDemandProvisional0
25FDemandProvisional0
26GDemandProvisional0
27HDemandProvisional4.3
28IDemandProvisional0
Sheet1
 
Upvote 0
so i had to create a calculated field that was days/14, i named it "percent of cap." then changed it to show percentage values. then i hid the column for the capacity total calculated field.
---------------
pivot percent of sub total.xlsx
HIKLMNOP
1Column Labels
2CapacityDemandDemand Capacity TotalDemand Percent Of Cap
3ConfirmedProvisional
4Row LabelsCapacity TotalCapacity TotalPercent Of CapCapacity TotalPercent Of Cap
5A140.553.93%8.258.57%8.7562.50%
6B145.438.57%00.00%5.438.57%
7C1416.2115.71%00.00%16.2115.71%
8D143.827.14%00.00%3.827.14%
9E1413.596.43%00.00%13.596.43%
10F1418.8134.29%00.00%18.8134.29%
11G1410.272.86%00.00%10.272.86%
12H1400.00%4.330.71%4.330.71%
13I143.525.00%00.00%3.525.00%
14Grand Total12671.95513.93%12.589.29%84.45603.21%
Sheet1
 
Upvote 0
That's a great workaround, thank you for that. Unfortunately, I would need it to be dynamic as the Capacity figure will change when other filters are applied.
 
Upvote 0
the problem i was running into is that with the given data you're asking to divide days by days, so it doesnt know which day value to divide by the other. i came up with a solution if you are able to add another column to your table. take a look below and let me know what you think. i added a vlookup to return the first days value based on person. so this should work as long as capacity is the first set of days. then i added a calculated field that was days/compare, i named it "percent of cap." then changed it to show percentage values. then i hid the column for the capacity total calculated field. let me know if you have any questions.
-------------------
pivot percent of sub total.xlsx
ABCDEFGHIMNOPQRST
1PersonDemand/CapacityStatusDayscompareColumn Labels
2ACapacityConfirmed1414CapacityDemandDemand Capacity TotalDemand Sum of Percent of Cap
3BCapacityConfirmed1414ConfirmedConfirmedProvisionalOperational
4CCapacityConfirmed1414Row LabelsCapacity TotalCapacity TotalSum of Percent of CapCapacity TotalSum of Percent of CapCapacity TotalSum of Percent of Cap
5DCapacityConfirmed1515A140.553.93%8.258.57%00.00%8.7520.83%
6ECapacityConfirmed1515B145.438.57%00.00%1.5511.07%6.9516.55%
7FCapacityConfirmed1515C1416.2115.71%00.00%00.00%16.238.57%
8GCapacityConfirmed1616D153.825.33%00.00%00.00%3.88.44%
9HCapacityConfirmed1616E1513.590.00%00.00%00.00%13.530.00%
10ICapacityConfirmed1616F1518.8125.33%00.00%00.00%18.841.78%
11ADemandConfirmed0.5514G1610.263.75%00.00%00.00%10.221.25%
12BDemandConfirmed5.414H1600.00%4.326.88%00.00%4.38.96%
13CDemandConfirmed16.214I163.521.88%00.00%3.521.88%714.58%
14DDemandConfirmed3.815Grand Total13571.9553.30%12.59.26%5.053.74%89.522.10%
15EDemandConfirmed13.515
16FDemandConfirmed18.815
17GDemandConfirmed10.216
18HDemandConfirmed016
19IDemandConfirmed3.516
20ADemandProvisional8.214
21BDemandProvisional014
22CDemandProvisional014
23DDemandProvisional015
24EDemandProvisional015
25FDemandProvisional015
26GDemandProvisional016
27HDemandProvisional4.316
28IDemandProvisional016
29ADemandOperational014
30BDemandOperational1.5514
31CDemandOperational014
32DDemandOperational015
33EDemandOperational015
34FDemandOperational015
35GDemandOperational016
36HDemandOperational016
37IDemandOperational3.516
Sheet1 (3)
Cell Formulas
RangeFormula
E2:E37E2=VLOOKUP([@Person],A:D,4,FALSE)

-------------------

1641564268326.png
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

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