Calculating Percentage between two columns

Mr Steve Cox

New Member
Joined
Jul 26, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have created a Pivot Table to count tickets completed vs tickets completed with a specific code (NLF). It is broken down by location and week within the reporting period. The main point of the table is to calculate what percentage of total tickets were coded with an NLF code, again broken down by location and week. Here is a screenshot:
1690402579328.png

I tried to do a calculated field, but my two fields "Closed Tickets" and "Coded NLF" were not available for putting into the formula. I simply need a third column showing that in Fayetteville, for example, 1 is 25% of 4. I also considered doing a column outside of the Pivot Table in Column D to do the calculation. That resulted in the following formula:
=GETPIVOTDATA("Coded NLF",$A$1,"System","Fayetteville","Date Created",DATE(2023,1,1))/GETPIVOTDATA("Closed Tickets",$A$1,"System","Fayetteville","Date Created",DATE(2023,1,1))
That gave the correct result for the first row, but dragging down Col D to fill did not adjust the formula for the rest of the pivot table. I can adjust it manually, but it is a large report and the source data will change (date ranges and which locations are represented) creating errors from some of the pivot table references. And so the formula would have to be rebuilt for each instance of the report.

Any help that you could give, either on the calculated field or on simplifying the calculation outside the pivot table would be greatly appreciated. Unfortunately, I am not able to link to the actual report or pivot table. I hope that I have given enough information to allow you to assist.
Thank you in advance!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,223,882
Messages
6,175,166
Members
452,615
Latest member
bogeys2birdies

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