Solved

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

Posted on 2011-09-21
221 Views
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
Question by:Jimmy_inc

LVL 41

Accepted Solution

dlmille earned 250 total points
@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

sanofi-aventis earned 250 total points
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.

sincerely,
T-Bone
0

## Featured Post

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.