Solved

Is it possible to show a Percentage in a pivotTable by a ROW instead of the GrandTotal

Posted on 2011-09-21
2
222 Views
Last Modified: 2012-05-12
Hi Experts,

I have tried adding a calculated Fields:

SUM(CAR)/Area called % CAR
SUM(BIKE)/Area called %CAR
But  I am getting a DIV/# error

I have also tried
% of row - which returns 100%
and % of column which returns the SUM(CAR)/GrandTotal - which I dont want want.


This must be possible ?
Percentage---Copy.bmp
0
Comment
Question by:Jimmy_inc
2 Comments
 
LVL 41

Accepted Solution

by:
dlmille earned 250 total points
ID: 36578711
@Jimmy_inc - pictures are great, and thanks for that.  Especially when you have "dummy data", (notwithstanding the fact I jumped on this one :) it helps you get faster responses when you upload the "dummy" spreadsheet!

See: http://www.pcreview.co.uk/forums/pivot-table-question-creating-new-field-calculates-thedivision-one-data-field-another-t3514147.html

You need to add a field as your "Row counter" (a column of 1's) to divide by the sum of the rows meeting the criteria of the pivottable setup..

Calculated field would then be Car% = Car / RowCount, etc.

ListFormulas from PivotTable:
Car%      =car/RowCount
Bike%      =bike/RowCount

However, your data is intriguing - and perhaps you intended it to be so.  This is a bit more sophisticated.

Car% = Car / (Car + Bike) ?  The percentage of Cars to the total transportation vehicles?  Is this what you'd like to do?

ListFormulas from PivotTable:
Car%      =car/(car+bike)
Bike%      =bike/(car+bike)

In that case, see example 2 in the attachment...

And, finally, if you have more than cars and bikes, we can modify "RowCount" to actually be the sum of all vehicles per instance... (in this case, would turn out to be the same as Car+Bike) and as a result, we have example 3 in the attachment...

ListFormulas from PivotTable:
Car%      =car/VehicleCount
Bike%      =bike/VehicleCount

See attached..

PS - exactly what is the calculation you're looking for?  :)


countingCars-r1.xls
0
 
LVL 2

Assisted Solution

by:sanofi-aventis
sanofi-aventis earned 250 total points
ID: 36581325
Jimmy,

I think your data is structured incorrectly to get the results you want. When using pivots, you want your data to be more linear. Your Bike/Car should become an atrribute of the fact information and then it can be compared side by side using the % of row values. If this is possible, You will be able to evaluate much easier.
 Example of new layout
sincerely,
T-Bone
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now