CUBE Formula w/ Multiple Years

bmsteve

New Member
Joined
Dec 30, 2013
Messages
7
Hi,

I have a table of sales data for the past 3 years.
I have a measure that sums the number of items sold.

I want to covert my pivot table to cube formulas to format a report.

In that report, I need a cell to display the number of items sold for the last two years.
Without using slicers, report filters, or adding/changing a measure* how can I expand the following formulas to sum the number of items sold for the last two years?

Cell A2 = CUBEMEMBER( "PowerPivot Data", "[tblYear].[Calendar Accident Year].&[2013]" )
Cell B1 = CUBEMEMBER( "PowerPivot Data", "[Measures].[Sum of Items Sold]", "Items Sold" )
Cell B2 = CUBEVALUE( "PowerPivot Data", A2, B1 )

I think it should look something like this, but this is not the correct syntax:

= CUBEMEMBER( "PowerPivot Data", "[tblYear].[Calendar Accident Year].&[2013]&[2012]" )

Any help would be greatly appreciated.

*I'd really like to gain a better understanding of how CUBE formulas can be utilized - that is why I am restricting my solution to just modifying the CUBE formula syntax.
Best,

Brandon
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,981
Messages
6,175,775
Members
452,668
Latest member
mrider123

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