Russ Reich
New Member
- Joined
- Nov 12, 2018
- Messages
- 1
I recently set out to make a very dynamic pivot table featuring multiple variables. The example below shows team data by status of testing. The main thing I need is to be able to see the grand total and also another field showing the % Complete dynamically in the pivot table. The goal is to refresh the pivot table from our server and have it seamlessly show us the below. The problem is the last cell in the total field (highlighted in red) for the calculated item % Complete is a total of the percentages. It needs to be ((passed + passed with work around) / (Grand total)) respectively for the last cell ((7662+157) / 9216) = 85%.
I un-selected the row totals and added two calculated items to show row totals as grand total and % complete as ((passed + passed with work around)) / (Grand total)).
Any thoughts or ideas would be greatly appreciated. I think I have exhausted the pivot table options is there a way to add VBA to make this work?
[TABLE="width: 852"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Column Labels[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Blocked[/TD]
[TD]Failed[/TD]
[TD]No Run[/TD]
[TD]Not Completed[/TD]
[TD]Passed[/TD]
[TD]Passed with work-around[/TD]
[TD]Grand Total[/TD]
[TD]% Complete[/TD]
[/TR]
[TR]
[TD]Team 1[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]237[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]271[/TD]
[TD="align: right"]93%[/TD]
[/TR]
[TR]
[TD]Team 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]27[/TD]
[TD][/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]Team 3[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]193[/TD]
[TD][/TD]
[TD="align: right"]238[/TD]
[TD="align: right"]81%[/TD]
[/TR]
[TR]
[TD]Team 4[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD="align: right"]79[/TD]
[TD][/TD]
[TD="align: right"]84[/TD]
[TD="align: right"]94%[/TD]
[/TR]
[TR]
[TD]Team 5[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]24%[/TD]
[/TR]
[TR]
[TD]Team 6[/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]260[/TD]
[TD][/TD]
[TD="align: right"]267[/TD]
[TD="align: right"]97%[/TD]
[/TR]
[TR]
[TD]Team 7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]59[/TD]
[TD="align: right"]408[/TD]
[TD="align: right"]117[/TD]
[TD="align: right"]3065[/TD]
[TD="align: right"]92[/TD]
[TD="align: right"]3749[/TD]
[TD="align: right"]84%[/TD]
[/TR]
[TR]
[TD]Team 8[/TD]
[TD][/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]473[/TD]
[TD="align: right"]53[/TD]
[TD="align: right"]869[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]1450[/TD]
[TD="align: right"]61%[/TD]
[/TR]
[TR]
[TD]Team 9[/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]413[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]462[/TD]
[TD="align: right"]90%[/TD]
[/TR]
[TR]
[TD]Team 10[/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]1969[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]2041[/TD]
[TD="align: right"]98%[/TD]
[/TR]
[TR]
[TD]Team 11[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]478[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]514[/TD]
[TD="align: right"]94%[/TD]
[/TR]
[TR]
[TD]Team 12[/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]68[/TD]
[TD][/TD]
[TD="align: right"]96[/TD]
[TD="align: right"]71%[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]120[/TD]
[TD="align: right"]1025[/TD]
[TD="align: right"]244[/TD]
[TD="align: right"]7662[/TD]
[TD="align: right"]157[/TD]
[TD="align: right"]9216[/TD]
[TD="align: right"]986%[/TD]
[/TR]
</tbody>[/TABLE]
I un-selected the row totals and added two calculated items to show row totals as grand total and % complete as ((passed + passed with work around)) / (Grand total)).
Any thoughts or ideas would be greatly appreciated. I think I have exhausted the pivot table options is there a way to add VBA to make this work?
[TABLE="width: 852"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Column Labels[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Blocked[/TD]
[TD]Failed[/TD]
[TD]No Run[/TD]
[TD]Not Completed[/TD]
[TD]Passed[/TD]
[TD]Passed with work-around[/TD]
[TD]Grand Total[/TD]
[TD]% Complete[/TD]
[/TR]
[TR]
[TD]Team 1[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]237[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]271[/TD]
[TD="align: right"]93%[/TD]
[/TR]
[TR]
[TD]Team 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]27[/TD]
[TD][/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD]Team 3[/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]193[/TD]
[TD][/TD]
[TD="align: right"]238[/TD]
[TD="align: right"]81%[/TD]
[/TR]
[TR]
[TD]Team 4[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD="align: right"]79[/TD]
[TD][/TD]
[TD="align: right"]84[/TD]
[TD="align: right"]94%[/TD]
[/TR]
[TR]
[TD]Team 5[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]24%[/TD]
[/TR]
[TR]
[TD]Team 6[/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]260[/TD]
[TD][/TD]
[TD="align: right"]267[/TD]
[TD="align: right"]97%[/TD]
[/TR]
[TR]
[TD]Team 7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]59[/TD]
[TD="align: right"]408[/TD]
[TD="align: right"]117[/TD]
[TD="align: right"]3065[/TD]
[TD="align: right"]92[/TD]
[TD="align: right"]3749[/TD]
[TD="align: right"]84%[/TD]
[/TR]
[TR]
[TD]Team 8[/TD]
[TD][/TD]
[TD="align: right"]33[/TD]
[TD="align: right"]473[/TD]
[TD="align: right"]53[/TD]
[TD="align: right"]869[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]1450[/TD]
[TD="align: right"]61%[/TD]
[/TR]
[TR]
[TD]Team 9[/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]34[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]413[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]462[/TD]
[TD="align: right"]90%[/TD]
[/TR]
[TR]
[TD]Team 10[/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]31[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]1969[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]2041[/TD]
[TD="align: right"]98%[/TD]
[/TR]
[TR]
[TD]Team 11[/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]478[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]514[/TD]
[TD="align: right"]94%[/TD]
[/TR]
[TR]
[TD]Team 12[/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]68[/TD]
[TD][/TD]
[TD="align: right"]96[/TD]
[TD="align: right"]71%[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]120[/TD]
[TD="align: right"]1025[/TD]
[TD="align: right"]244[/TD]
[TD="align: right"]7662[/TD]
[TD="align: right"]157[/TD]
[TD="align: right"]9216[/TD]
[TD="align: right"]986%[/TD]
[/TR]
</tbody>[/TABLE]