Categories in pivot table without stacking data

RIG

New Member
Joined
Jun 13, 2011
Messages
2
Hi all! I have a quick question - I would really appreciate your help.

My data set is set up in the following way (with these variables):

ID 2010-Sales 2011-Sales 2010-Costs 2011-Costs
1
2
3
etc.

I need to create a pivot table that has "Sales" and "Costs" as rows and "2010" and "2011" as columns.

I need to do this without stacking the data in the data set, if possible. Is there any way to do this directly in the pivot table, without changing the data set?

Thank you very much.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
If you are using Excel 2007 or greater MS changed the default layout where its in the stacking mode. You need to Right Click on the pivot table, then Pivot Table properties and under the Display tab, click Classic View.

Then put your year in the Columns and ID in the rows.

I think this is what you want.
 
Upvote 0
PCRIDE, thank you very much for your answer. Unfortunately, that is not what I am looking for. I was not talking about stacking the pivot table, I was talking about not stalking the data.

To build a pivot like I need (with year as columns and sales/income as rows), the Excel data that you use for the pivot needs to be arranged like this:
ID Year Sales Income

My data is arranged like this:
ID Sales-2010 Sales-2011 Income-2010 Income-2011

Is there any way to modify the data **in the pivot** (I do not want to modify the data set) to obtain a pivot table with Year (2011 and 2010) as columns, and Sales & Income as rows? That was my question.

Thanks again
 
Upvote 0
Oh I see, your data is somewhat backwards. I don't think a pivot table can use data in that format.

You will need to reformat the data set.
 
Upvote 0

Forum statistics

Threads
1,224,561
Messages
6,179,521
Members
452,923
Latest member
JackiG

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