CUBEVALUE formula that i need to change the reference to a cell

shophoney

Active Member
Joined
Jun 16, 2014
Messages
286
Hi I would like to know how to remove a specific reference to a location in a CUBEVALUE formula and have it reference a cell for the location #.

Below is my formula and it references location 9000 and I would like it to refer to whatever is in cell C6


=CUBEVALUE("ThisWorkbookDataModel","[Measures].[1YR AGO OH COST]","[dCLASS].[CLASS].[All]","[MachineCode]",Slicer_YEAR1,Slicer_MONTH1,Slicer_TRANS_DATE,Slicer_CLASS7,Slicer_NAME7)-CUBEVALUE("ThisWorkbookDataModel","[Measures].[1YR AGO COST TRANSFERED]","[dCLASS].[CLASS].[All]","[TRANSFERS].[loc# to].&[9000]",Slicer_YEAR1,Slicer_MONTH1,Slicer_TRANS_DATE,Slicer_CLASS7,Slicer_NAME7)+CUBEVALUE("ThisWorkbookDataModel","[Measures].[1YR AGO COST TRANSFERED]","[dCLASS].[CLASS].[All]","[TRANSFERS].[loc# created].&[9000]",Slicer_YEAR1,Slicer_MONTH1,Slicer_TRANS_DATE,Slicer_CLASS7,Slicer_NAME7)

Thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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