Power Pivot - Calculate the variance between columns when using column headers

MetalBee

New Member
Joined
Jul 23, 2013
Messages
16
Hi,

New to using Power Pivots, however I don't think this is necessarily a beginner problem.

I am trying to calculate the variances in my power pivot between two columns which contains forecast values, under the header of Month (when the forecast is applicable) and the subset of Forecast Period (when the forecast was made).

i.e.

Forecast 1 will have a forecast for January, February...December
Forecast 2 will have a forecast for January, February...December
and so on.

So my pivot will be arranged so that months are shown across the top of the pivot columns, with forecast period shown as a subset of the month. To add another layer of complexity to my problem forecast period data sets will be switched in and out, so I need to find a solution that will either use the pivot headers for the result, or will use an absolute cell/range in the formula to define the subset.

I have attached a sample of how my data would be laid out. Note that this month I would be looking to calculate:

Forecast 2 - Forecast 1 for each month. However, next time I would be looking to just drop in Forecast 3 - Forecast 2.


Source Data Sample
Forecast PeriodJanFebMarApr
Jan18801107898
Feb18871180114
Mar1845689205
Jan18
741118594
Apr1866558899
Apr1814789251
Jan1865847595

<tbody>
</tbody>


Pivot Layout Sample

Filters: nil
Columns: Values, Forecast Period
Rows: not relevant to the model, but are used
Values: Sum of Jan, Sum of Feb, ... Sum of Dec


Apologies, tried to upload a sample workbook but was unable to.

Appreciation of any guidance in advance.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I have an expression which works, however rather than define the criteria (shown in bold) I want to reference the pivot header. Is this possible?

CALCULATE([Sum of Apr],'AA - Inventory Archive'[Forecast Period]="Apr18")-CALCULATE([Sum of Apr],'AA - Inventory Archive'[Forecast Period]="Mar18")

Ideally I will have a set of measures set up for each month of the year and the model will dynamically give me the variance based on which data set (Forecast Period) I define to be shown in the pivot via a filter, and which measure I choose to drop into the pivot.

Still seeking assistance.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,678
Members
449,116
Latest member
HypnoFant

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