Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot Table: Calculated Field Total

Status
Not open for further replies.

twifosp

Programmer
Joined
Jul 25, 2003
Messages
186
Location
US
I'm trying to add a Caculated Field to my pivot table.

I want it to be a percent_of field based on the grand total of an entire column. The data would look like:

Count_Of Percent_Of
1 1.82%
2 3.64%
3 5.45%
4 7.27%
5 9.09%
6 10.91%
7 12.73%
8 14.55%
9 16.36%
10 18.18%

So the calculated field would look something along the lines of: =count_of/total(count_of)

But of course total isn't a valid operator for a calcalated field, and using SUM() only does it for that particular row, so it always ends up as 1.

The pivot table is generated from a dynamic data source, so I need the report to also be dynamic. So I don't want a manual solution where I divide each row by the grand total row...

Anyone have any ideas?
 
Yup.

I'm not sure if this is all your data, but let me try with what you've given me.

Drag your Count_Of field into the Data Fields. Then, drag ANOTHER Count_Of field into the Data fields. Double-click this field, click the Options>> button. There should be a drop-down list, Show value as... Select "% of Column". This gives you what you need.

At this point, you'll probably have to drag the gray box that says "Data Fields" into the Column section. Lost yet?

If this was overly confusing, let me know, I'll do a step-by-step.

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
Perfect. I was not aware that it was prebuilt into the options. Here I was trying to do a custom calculated field :)

No it was not confusing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top