Calculations using Pivot Table data...

ExcelUser64

New Member
Joined
Oct 18, 2017
Messages
9
I'm a reasonably new user of Pivot Tables, but appear to have stumped other experts at work with this problem. I have the following sample data in the first three columns and the Pivot Table to the right of it as follows:


<colgroup><col><col><col><col><col><col><col><col><col><col></colgroup><tbody></tbody>
NameTaskStatusCount of TaskColumn Labels
JohnTask 1DoneRow LabelsDoneMissWIPGrand Total
ChrisTask 2MissJohn213
LukeTask 3MissLuke213
TomTask 4DoneChris1113
JohnTask 5DoneTom1113
ChrisTask 6WIPGrand Total45312
LukeTask 7WIP
TomTask 8Miss
JohnTask 9Miss
ChrisTask 10Done
LukeTask 11Miss
TomTask 12WIP

<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

What I need to do is add the number of tasks that were either Missed or WIP and divide that number by the Grand Total. Near as I can tell, this means that for each user, I need to somehow 'identify' the data that I want to use for the above calculation from within the Pivot Table.

So, how do I pick the appropriate data, add it, and then divide by another value? This, of course, would go into a new calculated field within the Pivot Table (say, "IncompleteWork").

Thanks!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
FYI - the desired result would indicate that John has 33%, Luke has 100%, Chris has 67%, and Tom has 67% - and the total project would have 8/12 = 67% of work left to be finished.
 
Upvote 0
Welcome to the forum.

You could add a calculated Item (not Field) that adds Miss and WIP together. Then filter out the individual Miss and WIP items and choose to display the counts as a percentage of the row total.
 
Upvote 0
Are you suggesting that I add this calculated Item 'outside' of the Pivot Table? I did this, but then if I filter by user and one of the items (Miss, Done, or WIP) is missing from that user, the columns change (i.e. the column won't show if there's no data for that user) and the external formula 'breaks'.

Being able to specifically identify (pick) the data within the Pivot Table and perform calculations within the Table would resolve that problem.
 
Upvote 0
Upon re-reading you post - how do I add the two 'Pivot Table Calculated' values together within the table?
Or are you suggesting that I do this in the original data set (which won't work as well for me)?
 
Upvote 0
No, I mean in the pivot table. Select one of the item column header cells in the pivot table, then choose to add a Calculated Item in the same dialog you use to create Calculated Fields.
 
Upvote 0
Got it! I added that Calculated Item (called Test) which adds Miss+WIP (thanks!.

Count of TaskColumn Labels
Row LabelsDoneMissWIPTestGrand Total
John2114
Luke2136
Chris11125
Tom11125
Grand Total453820

<tbody>
</tbody>

However, the Test item is now added into the Grand Total. So, instead of Row 1 being 33%, it now shows 50% (Miss+WIP+Test)/Total. As such, Tom shows 80% (=4/5) instead of 67% (i.e. (1 Miss + 1 WIP)/3 Tasks ).


<colgroup><col><col><col span="2"><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
As I said, you need to then filter out the Miss and WIP items so they aren't double counted.
 
Upvote 0
I must have done something wrong when I filtered the first time because it didn't work. However, I tried it again and viola (renamed test to PPC)!

Thank you so much!

Count of TaskColumn Labels
Row LabelsDonePPCGrand Total
John66.67%33.33%100.00%
Luke0.00%100.00%100.00%
Chris33.33%66.67%100.00%
Tom33.33%66.67%100.00%
Grand Total33.33%66.67%100.00%

<tbody>
</tbody>
 
Upvote 0
Glad to help. :) It's a rare day when calculated items are actually useful, in my experience. :)
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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