How do I create multiple "values" in a pivot table from information in the same data column? And calculate variances?

smart cubes

New Member
Joined
Mar 27, 2018
Messages
4
Here is a highly simplistic data set:

TypeMonthCountDepartmentGrade
BudgetFebruary
1
Marketing
1
BudgetFebruary
1
Operations
2
BudgetFebruary
1
Marketing
3
BudgetFebruary
1
Operations
4
ActualFebruary
1
Marketing
2
ActualFebruary
1
Marketing
2
ActualFebruary
1
Operations
1
ActualFebruary
1
Operations
3



How would I make it so that in my pivot table, in the values section, I could break it out into multiple values (such as Budget compared against Actual)? I'd like to compare Budget count to Actual count with the ability to break it out by department and grade. And how would I get the pivot table to automatically calculate the variance between the two?

How would I do that? How would I compare data categories in the same column in a pivot table? I've seen it done before, but I'm just not sure how to do it.


So that my pivot table looks like this:

Count of TypeType
DepartmentGradeActualBudgetVariance
Marketing
1
1
1
0
2
1
-1
3
1
1
Marketing Total
2
2
Operations
1
1
-1
2
1
1
3
1
-1
4
1
1
Operations Total
2
2
4
Total
4
4
8


Right now, I can't get the pivot table to calculate variances between both data types. Instead it sums them. When I right click the pivot table and choose "show values as" it doesn't have an option for variance. When I select "summarize value field by", then "more options" the "var" menu fills my pivot table with #DIV/0! errors

Any help is appreciated
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
My post above didn't capture the tables as neatly as I wanted to.

Here is a cleaner look at the data set:

dataq.PNG


And here is a cleaner look at the pivot table:

pivotq.PNG
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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