How do I get row headers (in my data) into column headers (in my pivot table)?

smart analyst

New Member
Joined
Mar 27, 2018
Messages
7
Hi all,

I'm trying to figure out two things here:

1.) How do I get my row headers (from data) into specialized, newly created header fields (in my pivot table)?

2.) How do I then go on to create a calculated field from these two new specialized headers in the pivot?


Simple example below:


1619362743740.png



1619362769921.png




The yellow section highlights my first question - how do I get separate row headers as unique field items in columns in my pivot table

The green section highlights my second question - how do I get get a calculated field in my pivot table (in this case variance) with those newly created unique fields?


Thank you!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Put TYPE in column section.
Hey Mart,

I understand this part - however, I need to be able to calculate the items in the type field, which means that I would have to keep them in values, if I remember correctly. So in order to get a calculated variance between both row types, how would I go about doing that?
 
Upvote 0
Department in rows
Type in columns, Type in values as count
Insert calculated field -
formula = budget - actual

Difficult to be more detailed as typing this on phone
 
Upvote 0
Department in rows
Type in columns, Type in values as count
Insert calculated field -
formula = budget - actual

Difficult to be more detailed as typing this on phone
Hi rhombus,

When I try this method, I don't have "budget" and "actual" to choose from when I try to calculate field. Is there a way I can have these row headers appear as individual fields so that I can calculate them in my pivot table? Right now, I only see "type", "department", and "headcount" as fields that can be calculated.
 
Upvote 0
Instead of calculated field you can use calculated item.

Put only TYPE in ROWS
Select a item
Make a calculated item (now you can choose BUDGET and ACTUAL)
Move TYPE to COLUMNS
Add the other fields
 
Upvote 0
Solution
Instead of calculated field you can use calculated item.

Put only TYPE in ROWS
Select a item
Make a calculated item (now you can choose BUDGET and ACTUAL)
Move TYPE to COLUMNS
Add the other fields
Thank you, Mart!

This accomplished what I needed to do.

Although, I am curious - if I wanted to get "actual", "budget" and "variance" as separate field items (sitting in the values portion of the pivot table), how would I do that?

There's a report that I see that was able to do something like that, and I'm very curious how I would do it.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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