Referencing Measure with Cube Function

Jerid421

New Member
Joined
Jan 10, 2014
Messages
12
I have a slicer attached to a PowerPivot pivot table that filters for a field called Project_Code. I need to display another field (Project_Text) above the pivot table, that is associated with whichever Project_Code is selected.

So, I wrote a measure to be sure that I only return a value when the measure has (1) value:

FundProj:= IF(COUNTROWS(VALUES(dim_project[project_text]))=1, VALUES(dim_project[project_text]),"")

This formula returns the correct Project Text when I filter the PowerPivot table for a particular Project_Code. My problem is that the Cube Function that I wrote in the display cell above the pivot doesn't work:

=CUBEVALUE("ThisWorkbookDataModel","[Measures].[FundProj]")

Shouldn't the measure's filter context change when (1) Project_Code is chosen in the slicer, then subsequently, make the FundProj measure return the corresponding Project_Text value?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
your CUBEVALUE works the same way as a pivot with only one measure in the values area and no filter. You need to add the filter as you do it in your pivot. Filter can either be a CUBEMEMBER Formula in a cell or the name of a slicer (e.g. Slicer_Project_Code)
 
Upvote 0
Tianbas,

Thanks very much! I added the slicer name to the expressions and it works perfectly!!!

=CUBEVALUE("ThisWorkbookDataModel","[Measures].[FundProj]", Slicer_projectcd11111)

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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