% of an item in a column (pivot table)

raphael.goncalves

New Member
Joined
May 10, 2011
Messages
3
I have 3 columns in my database, column a) in which an item can be "A" or "B", column b) a column with a customer name and column c) a column with the value.

In the pivot table I want to show for each customer the sum of column c), and the % of the item "A" from the sum in column c).

Let's say "a" it's my product, so I want to show from the total sales of each customer, how much is "a", but I still want to show how much are my total sales without dividing "A" and "B".

Example:
Total Sales Percentage of "A"
Customer John 10 100%
Customer James 15 80%
Customer Jack 12 17%

It means that customer John bought 10 pieces, all of them are "A", James bought 15 pcs, 12 of which are "A", and Jack bought only 2 "A"s.

Anyone has any idea how to do it?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to MrExcel.

Add a column to your source data with a formula like:

=SUMPRODUCT(--(A$2:A$10="A"),--(B$2:B$10=B2),C$2:C$10)/SUMIF(B$2:B$10,B2,C$2:C$10)

Expand the ranges to suit, but make sure that they all have the same number of rows and avoid using entire columns.

Include Average of that column in your pivot table's data area.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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