Calculated Field in Pivot Table

reberryjr

Well-known Member
Joined
Mar 16, 2017
Messages
701
Office Version
  1. 365
Platform
  1. Windows
I'm trying to create a calculated field in a pivot table. The table's structure is below. The Sum of Sum of Clean Loans (I'll change the title once the data works) should come out to 82. I've also pasted the formula in the calculated field below.

I've never worked with these before, and have been googling/searching for about 75 minutes.

Row LabelsCount of LoanNumSum of Exception CountSum of Sum of Clean Loans
Tommy Chong
8311
<colgroup><col width="138" style="width: 104pt; mso-width-source: userset; mso-width-alt: 5046;"> <col width="127" style="width: 95pt; mso-width-source: userset; mso-width-alt: 4644;"> <col width="163" style="width: 122pt; mso-width-source: userset; mso-width-alt: 5961;"> <col width="188" style="width: 141pt; mso-width-source: userset; mso-width-alt: 6875;"> <tbody> </tbody>

D0sqMv2u7krKAAAAAElFTkSuQmCC
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi, just curious, wouldn't it be possible to just add a column in your table instead of creating a calculated field? Based on the values you shown, 83 - 1 = 82 but this is a count - a sum...
 
Upvote 0
Ultimately, I'm going to have to have a calculated field at some point, as I also have to provide a calculation like =(83-1)/83. Or, I could be misunderstanding what you're suggesting.
 
Upvote 0
It might be easier to perform the calculation within the excel table prior to the Pivot Table...
In other words add a column to your data.
The Pivot table might not be able to calculate a field that is the subtraction in between a Count and a SUM
 
Upvote 0
I'll have to find a different way to go about this then. Given the way the data is structured, I don't see a way to perform the calculation in the data set, as there are multiple records per User, and the items being calculated are across several rows.
 
Upvote 0
Calculated fields always use the sum of the fields involved. If you need a record count, you'll have to add a column to the source data that just returns 1 for each row, so that you can sum it in the pivot table. Or, if you have Power Pivot, you can do pretty much any calculation you like.
 
Upvote 0
I do have PowerPivot, but haven't quite figured out how to make it work yet, as it seemed like a completely different application. I'll try to play with it some more.
 
Upvote 0
With PP you can create measures (calc fields) to count values, then other measures can subtract those measures.
 
Upvote 0
Calculated fields always use the sum of the fields involved. If you need a record count, you'll have to add a column to the source data that just returns 1 for each row, so that you can sum it in the pivot table. Or, if you have Power Pivot, you can do pretty much any calculation you like.
In Excel 2016, at least, a calculated field defaults to Sum. However in the Values section you can easily change the field to Count by changing its Values Field Settings, so no need for an extra column.
 
Upvote 0
I think we are talking about different things, John. If you put a numeric field into the Values area it will default to Sum, but that's not a calculated field.
 
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
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