PowerPivot, have ID, want to display name - CUBEMEMBER & CUBEMEMBERPROPERTY & GETPIVOTDATA won't work.

omaroses

New Member
Joined
Apr 13, 2016
Messages
1
This should be simple, but I've fought it for DAYS. HELP!

Excel 2010. PowerPivot with 3 tables. A few PowerPivot pivot's are in my Excel sheet.

On a regular sheet, in a regular cell, in A1 I want to enter a customer ID. In A2, I want to display the customer's name. I can get measures & calculated values to display, but not the name.


Here is an example of my Customer powerpivot table:
ID Name SalesRep EffectiveDate CreditLimit
001 ABC Company Ed 1/1/2015 $10,000
002 XYZ Company Fred 3/1/2015 $20,000


=CUBEMEMBER("Cube_name",{"[Customer].[ID].&[12345]","[Customer].[Name].&[ABC Company]"})


The CUBEMEMBER function is unhelpful because I'm required to know the Customer Name of "ABC Company" in order to get the value returned. I've tried the CUBEMEMBERVALUE function, but get #N/A results. I've made a PowerPivot table in my workbook and then tried GETPIVOTDATA, but since it's in a value(row) area, and not a calculated column, it refers to a cell, and isn't dynamic. I've tried measures with FIRSTNONBLANK, and a few other things I saw in google searches, but can't get anything to work.

What am I doing wrong? Any help is greatly appreciated.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I don't have 2010, only 2013 but think CUBE functions are the same. If i understand what you are trying to do, you need to use the CUBEVALUE function. CUBEVALUE returns a value from the data model give the dimensions (aka CUBEMEMBERS) you want to reference.

Code:
=CUBEVALUE("Cube_Name",[COLOR=#333333]CUBEMEMBER("Cube_name",{"[Customer].[ID].&["& A1 & "]"[/COLOR] ), [COLOR=#333333]CUBEMEMBER("Cube_name",[/COLOR]"[Measures].[CustomerName]") )

where [CustomerName] is a measure that returns the name give the customer id. For that you should be able to use
Code:
CustomerName:=LASTNONBLANK(Customer[CustomerName], Customer[ID])

Let me know if this works out for you...
 
Upvote 0
You could try this array formula
Code:
=CUBERANKEDMEMBER("[COLOR=#333333]Cube_name[/COLOR]",SET.NAMES,MATCH(A1,--CUBERANKEDMEMBER("[COLOR=#333333]Cube_name[/COLOR]",SET.IDS,ROW(INDIRECT("1:"&CUBESETCOUNT(SET.IDS))))))

where SET.IDS is a CUBESET call for the customer ids and SET.NAMES is a CUBESET call for customer names.
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

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