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?
 

Tianbas

Board Regular
Joined
Apr 29, 2014
Messages
101
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)
 

Jerid421

New Member
Joined
Jan 10, 2014
Messages
12
Tianbas,

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

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

Thanks again!
 

Forum statistics

Threads
1,078,273
Messages
5,339,190
Members
399,288
Latest member
ossa

Some videos you may like

This Week's Hot Topics

Top