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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot table - need % of total of a sum of two fields 1

Status
Not open for further replies.

shellig

Technical User
Apr 19, 2002
34
US
We have data in a spreadsheet that comes out:
Code:
Date    Reason    Good    Bad
9/17/06    Dropped   0    5
9/17/06        12    0
9/18/06    Kicked    0    8
9/18/06    Dropped   0    2
9/19/06        24    0
9/20/06        25    0
Obviously this is a snippet of total data.
I use a pivot table to get Sum of Good / Sum of Bad by Reason by month for the year.
1) What I need is the Sum of Bad/Total in percent column and I can't figure out how to do it. (I already added a column that adds the Good and Bad columns to get the Total in the worksheet but that does not help me with the Pivot Table.
2) I also don't know how to get rid of the Sum Good under the Reason columns and still have a Total Sum of Good Column (if this is even possible).

 
Darn...no way to edit or delete a post after you submit!!
Code:
Date    Reason    Good    Bad
9/17/06    Dropped   0    5
9/17/06             12    0
9/18/06    Kicked    0    8
9/18/06    Dropped   0    2
9/19/06             24    0
9/20/06             25    0
 



Hi,

Trouble is with how you structured your data -- it's NOT normalized.

[tt]
Date Reason Val Cat
9/17/2006 Dropped 0 Good
9/17/2006 12 Good
9/18/2006 Kicked 0 Good
9/18/2006 Dropped 0 Good
9/19/2006 24 Good
9/20/2006 25 Good
9/17/2006 Dropped 5 Bad
9/17/2006 0 Bad
9/18/2006 Kicked 8 Bad
9/18/2006 Dropped 2 Bad
9/19/2006 0 Bad
9/20/2006 0 Bad
[/tt]

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Hi Shellig,

I'm not sure I know what you're trying to accomplish but the following may help you:

1 Right click on the "brick" representing the Data Items
2 Select Field Settings
3 Select Options
4 Drop-down menu and select from Show Data As
(see the descriptions below)
6 Drop-down menu and pick the Base Field

% of Column shows us the percentage that each location in a data Column represents based on the Grand Total

% of Row shows us the percentage that each item represents based on the total

% of Total shows us the percentage that each item represents based on the total

Difference From shows us the change between one column and the previous column

% Difference From shows us the percentage difference between one column and the previous column

% Of shows us the percentage difference between one selected item and the other items

Running Total In shows a new total as each value is added going down the columns

Hope this helps,




Best,
Blue Horizon [2thumbsup]
 
Thanks for your help...I used SkipVought's suggestion which lets me do what I want...I have to make duplicate records when there is Good and Bad on the same line...(why you would have good parts with a defect code I don't know but that is how the database I am using is sometimes completed).
I had originally tried this with the method BlueHorizon explains but because there was not a total for Good + Bad just a total for Good and a total for Bad, I could not use that and the row total was not giving me exactly what I wanted either...where I could separate out defect and get the count and % bad...
 



I would NOT create a record where the VALUE is 0.

My example was a quick 'n' dirty transformation.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top