Pivot Table

zinah

Active Member
Joined
Nov 28, 2018
Messages
368
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have below table and not sure how can I set this table to produce a pivot table that has Rows=Location & Columns = Function.


LocationFunction1Function2Function3Function4Function5Function6Function7TotalYear
Loc1000140052018
Loc241052100312018
Loc3000010012018
Loc4000030032018
Loc5000010012018
Loc6000050052019
Loc7000010012019
Loc8000110022019
Loc9000200022019
Loc10000040042019

As the current table can produce only below pivot table:

Row LabelsSum of Total
Loc1
5​
Loc10
4​
Loc2
31​
Loc3
1​
Loc4
3​
Loc5
1​
Loc6
5​
Loc7
1​
Loc8
2​
Loc9
2​
Grand Total
55​
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
like this?
Sum of ValueAttribute
YearLocationFunction1Function2Function3Function4Function5Function6Function7Grand Total
2018Loc100014005
Loc24105210031
Loc300001001
Loc400003003
Loc500001001
2019Loc1000004004
Loc600005005
Loc700001001
Loc800011002
Loc900020002
Grand Total4109410055

or
LocationSum of Value
Loc15
Loc104
Loc231
Loc31
Loc43
Loc51
Loc65
Loc71
Loc82
Loc92
Grand Total55

or
LocationAttributeSum of Value
Loc1Function10
Function20
Function30
Function41
Function54
Function60
Function70
Loc10Function10
Function20
Function30
Function40
Function54
Function60
Function70
Loc2Function14
Function21
Function30
Function45
Function521
Function60
Function70
Loc3Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc4Function10
Function20
Function30
Function40
Function53
Function60
Function70
Loc5Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc6Function10
Function20
Function30
Function40
Function55
Function60
Function70
Loc7Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc8Function10
Function20
Function30
Function41
Function51
Function60
Function70
Loc9Function10
Function20
Function30
Function42
Function50
Function60
Function70
Grand Total55

or I misunderstood
 
Upvote 0
like this?
Sum of ValueAttribute
YearLocationFunction1Function2Function3Function4Function5Function6Function7Grand Total
2018Loc100014005
Loc24105210031
Loc300001001
Loc400003003
Loc500001001
2019Loc1000004004
Loc600005005
Loc700001001
Loc800011002
Loc900020002
Grand Total4109410055

or
LocationSum of Value
Loc15
Loc104
Loc231
Loc31
Loc43
Loc51
Loc65
Loc71
Loc82
Loc92
Grand Total55

or
LocationAttributeSum of Value
Loc1Function10
Function20
Function30
Function41
Function54
Function60
Function70
Loc10Function10
Function20
Function30
Function40
Function54
Function60
Function70
Loc2Function14
Function21
Function30
Function45
Function521
Function60
Function70
Loc3Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc4Function10
Function20
Function30
Function40
Function53
Function60
Function70
Loc5Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc6Function10
Function20
Function30
Function40
Function55
Function60
Function70
Loc7Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc8Function10
Function20
Function30
Function41
Function51
Function60
Function70
Loc9Function10
Function20
Function30
Function42
Function50
Function60
Function70
Grand Total55

or I misunderstood
Like the first option
 
Upvote 0
like this?
Sum of ValueAttribute
YearLocationFunction1Function2Function3Function4Function5Function6Function7Grand Total
2018Loc100014005
Loc24105210031
Loc300001001
Loc400003003
Loc500001001
2019Loc1000004004
Loc600005005
Loc700001001
Loc800011002
Loc900020002
Grand Total4109410055

or
LocationSum of Value
Loc15
Loc104
Loc231
Loc31
Loc43
Loc51
Loc65
Loc71
Loc82
Loc92
Grand Total55

or
LocationAttributeSum of Value
Loc1Function10
Function20
Function30
Function41
Function54
Function60
Function70
Loc10Function10
Function20
Function30
Function40
Function54
Function60
Function70
Loc2Function14
Function21
Function30
Function45
Function521
Function60
Function70
Loc3Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc4Function10
Function20
Function30
Function40
Function53
Function60
Function70
Loc5Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc6Function10
Function20
Function30
Function40
Function55
Function60
Function70
Loc7Function10
Function20
Function30
Function40
Function51
Function60
Function70
Loc8Function10
Function20
Function30
Function41
Function51
Function60
Function70
Loc9Function10
Function20
Function30
Function42
Function50
Function60
Function70
Grand Total55

or I misunderstood

This is what I get when I do the pivot table, not sure why the function name disappears:

1582908277087.png


1582908295928.png
 
Upvote 0
use Power Query (Get&Transform)
Data - From Table
---
in Power Query Editor:
select all Function columns
Unpivot only selected columns
Close & Load to - Connection only
----
Insert Pivot Table
use external data source - choose Query - (your table name)
choose location for your Pivot Table
then Year and Location into ROWS Area
Attribute into the COLUMNS Area
Value into the VALUES Area
 
Upvote 0
or you can add Totals Row to your Excel Table and define what you want in Totals Row (without Pivot Table)
LocationFunction1Function2Function3Function4Function5Function6Function7TotalYear
Loc1000140052018
Loc241052100312018
Loc3000010012018
Loc4000030032018
Loc5000010012018
Loc6000050052019
Loc7000010012019
Loc8000110022019
Loc9000200022019
Loc10000040042019
Total4109410055

for Year choose - none
for the rest - sum
 
Upvote 0
or you can add Totals Row to your Excel Table and define what you want in Totals Row (without Pivot Table)
LocationFunction1Function2Function3Function4Function5Function6Function7TotalYear
Loc1000140052018
Loc241052100312018
Loc3000010012018
Loc4000030032018
Loc5000010012018
Loc6000050052019
Loc7000010012019
Loc8000110022019
Loc9000200022019
Loc10000040042019
Total4109410055

for Year choose - none
for the rest - sum
That helped a lot, as I couldn't find Power Query Editor, and this solution is simpler, thank you so much for your help!
 
Upvote 0
You are welcome
I am glad you are happy :)

btw. update your profile about excel version (Account Details) - less troubles and wasted posts
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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