CUBEVALUE + Named Value

SimonNU

Board Regular
Joined
Jul 11, 2013
Messages
140
Hi Guys

I'm having issues feeding a named cell into the CUBEMEMBER formula. I would like the below to insert a named range iCurrentPeriod in the place of "11". Can you please advise?


Code:
=CUBEMEMBER("PowerPivot Data",{"[UTILIZATION SHEETS].[Period].&[11]","[Measures].[Sum of FTE]"},"ACTUALS")

=

Code:
=CUBEMEMBER("PowerPivot Data",{"[UTILIZATION SHEETS].[Period].&[[B]iCurrentPeriod[/B]]","[Measures].[Sum of FTE]"},"ACTUALS")
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Could you use an if statement to say something like if there is an 11, insert iCurrentPeriod? Just a suggestion, not sure how CubeValue works.
 
Upvote 0
Oops, the title reads CUBEVALUE... It is supposed to read CUBEMEMBER.

The question is more of an Excel based question as opposed to a PP one I guess...

No if statement should be required. The solution should be something like this but I can't get it working:


=CUBEMEMBER("PowerPivot Data",{"[UTILIZATION SHEETS].[Period].&[" & iCurrentPeriod & "]","[Measures].[Sum of FTE]"},"ACTUALS")</pre>
 
Upvote 0
Try to avoid the {} and separate it in two formulas. One Formula only for the period and one for the Sum of FTE. In your CUBEVALUE formula you can refer to the cell with the period fomula. Change that period cell and your CUBEVALUE will be updated.

Sometimes it also works if you just enter the correct name of the period in that cell. As an example I have a report with following CUBEVALUE formula:

=CUBEVALUE("PowerPivot Data";$A$1;$A$2)
A1 includes a CUBEMEMBER formula =CUBEMEMBER("PowerPivot Data";"[Measures].[Sum of XYZ]")
A2 was the following formula in the beginning =CUBEMEMBER("PowerPivot Data";"[Period].[Month].&[Jul]") until I realized that the CUBEVALUE formula also updates if I just enter Jul in cell A2
 
Upvote 0

Forum statistics

Threads
1,224,020
Messages
6,175,966
Members
452,691
Latest member
Tony_Almeida

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