Calculate Variance between two categories

domtrump

Board Regular
Joined
Apr 1, 2010
Messages
245
So I have a power pivot table set up where I Two categories "1-12 Months" and "13-24 Months" Then I have a bunch of measures. I need to create a variance that subtracts all of the 13-24 Month measures from all of the 1-12 Month measures. What is the best way to accomplish this?


Excel Workbook
CDEFGHIJKLMNOPQRST
1**PeriodData**************
2**1-12 Months*******13-24 Months*******
3StateCountyPatronsDaysPlay DaysTheoActualCompsBus E-PromoE-PromoPatronsDaysPlay DaysTheoActualCompsBus E-PromoE-Promo
4NJAtlantic County8,336135,538127,3049,208,3499,385,9711,776,92684,1701,326,7399,433120,766113,6788,005,0257,390,0651,329,202129,0051,313,441
5*Bergen County8,08729,57928,2144,248,5095,243,0321,247,943211,605900,9478,10426,12425,0903,759,9873,982,8361,036,270171,835596,650
6*Burlington Coun5,19723,38222,6282,459,8342,394,601518,05891,205443,4145,68921,47920,7361,776,7011,841,167350,65291,196326,007
7*Camden County7,18341,89940,2734,095,4854,173,976865,510174,700797,4607,80835,44134,1673,097,9803,191,898599,426163,774575,353
8*Cape May County1,77013,85813,1361,549,1041,537,671325,45550,785294,8871,85112,78212,2081,578,8921,575,169330,25456,795271,088
9*Cumberland Coun2,07916,32415,7661,381,3301,408,105217,71960,945262,2072,21213,21012,7741,013,276996,078139,40965,290238,378
10*Essex County8,40124,43023,6392,295,5822,213,431443,330209,505487,7857,18720,58019,8501,888,5831,753,393415,847131,965309,780
Sheet1
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Is this necessary to do a separate measures for each country?
Maybe one measure per "patrons","days" and so on be enough. You could be able to filter it by countries in a pivot.
Then you can easly do 8 measures:
Variance (Petrons):=[1-12 Months & Petrons] - [13-24 Months & Petrons]
Variance (Days):=[1-12 Months & Days] - [13-24 Months & Days]
...
 
Upvote 0
Is this necessary to do a separate measures for each country?
Maybe one measure per "patrons","days" and so on be enough. You could be able to filter it by countries in a pivot.
Then you can easly do 8 measures:
Variance (Petrons):=[1-12 Months & Petrons] - [13-24 Months & Petrons]
Variance (Days):=[1-12 Months & Days] - [13-24 Months & Days]
...

What would be the syntax for such a measure? "1-12 Months" and "13-24 Months" are two values for my [timeframe] column.
 
Upvote 0
Just to clarify. Do all cells with figures in your set are measures? So there are the data? Please attach some.
On the beginning You should reduce a number of measures. Why there are separate measures for each country? You can do one measure for let say "Petrol" and cross filter it later in a pivot by countries, and whatever you have got in your source data. Let's call this measure "1-12 Months & Petrons" - It means, it is dedicated to Petrol and 1-12 Months period. Then you can create a similar one for "13-24 Months & Petrons". At the end subtract one from another
 
Upvote 0

Forum statistics

Threads
1,224,140
Messages
6,176,600
Members
452,738
Latest member
kylua

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