Have some columns not aggregate in Pivot Table

ilya2004

Board Regular
Joined
Mar 17, 2011
Messages
135
Hello all,

I am trying to create a pivot table where I am displaying success rate (displayed as %). I would like to be able to sort on the left hand side by country descending by total employee population and across the top I have some business segments (dummy table below).

My problem that when I use business segment as a column value in the pivot table, it will then try to aggregated both the success rate AND the population size. However, I don't care about the population in each segment, I only care about their success rate, and I would like the population to be aggregated totally for the whole country (so that I can sort by large countries).

I can think of some hacks to do this, but I wanted to see if there was a real way to do this within pivot table configuration.

I hope that makes sense.

Sum of PopulationSalesServicesOperations
Canada7009%80%42%
Romania690100%16%39%
China68023%76%20%
Saudi Arabia67029%44%6%
Brazil66098%58%34%
Australia65030%57%7%
Germany64079%54%71%
Israel63072%50%34%
Spain62055%6%45%
Indonesia61050%37%33%
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I don't have an origin, it's just dummy data. You can imagine any table that looks like this, which I then try to aggregate


NameCountryBusiness SegmentSuccess Rate
JackCanadaSales
80%​
JohnChinaServices
95%​
LukeCanadaSales
91%​
SamBrazilOperations
25%​
PatIsraelServices
100%​
CharlieCanadaSales
87%​
 
Upvote 0
Now, I understand you, well an easy way for do this is to use Power Query

Book1
ABCDE
1Table origin (for me ventas)
2NameCountryBusiness SegmentSuccess Rate
3JackCanadaSales80%
4JohnChinaServices95%
5LukeCanadaSales91%
6SamBrazilOperations25%
7PatIsraelServices100%
8CharlieCanadaSales87%
9
10
11
12Ctrl + t
13
Sheet20


Book1
ABCDEFGHIJKL
1This is the table from Power QueryYour example result
2NameCountrySuccess RateAttributeValueSum of PopulationSalesServicesOperations
3JackCanada0.8Business SegmentSalesCanada7009%80%42%
4JohnChina0.95Business SegmentServicesRomania690100%16%39%
5LukeCanada0.91Business SegmentSalesChina68023%76%20%
6SamBrazil0.25Business SegmentOperationsSaudi Arabia67029%44%6%
7PatIsrael1Business SegmentServicesBrazil66098%58%34%
8CharlieCanada0.87Business SegmentSalesAustralia65030%57%7%
9Germany64079%54%71%
10Israel63072%50%34%
11Spain62055%6%45%
12Indonesia61050%37%33%
13
14
15
16
17
18
19
20This is the pivot table result
21Sum of Success RateValue
22CountryNameOperationsSalesServices
23BrazilSam25.00%
24CanadaCharlie87.00%
25Jack80.00%
26Luke91.00%
27ChinaJohn95.00%
28IsraelPat100.00%
29
Sheet21


Code:
let
    Source = Excel.CurrentWorkbook(){[Name="ventas"]}[Content],
    #"Need_columns" = Table.Unpivot(Source, {"Business Segment"}, "Attribute", "Value")
in
    #"Need_columns"


Here, I share an Example
 
Upvote 0

Forum statistics

Threads
1,215,323
Messages
6,124,246
Members
449,149
Latest member
mwdbActuary

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