Can CUBEMEMBER be used to retrieve data from Data Model?

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I have a table in my data model and one column is ID and another Description.

I'm wondering if I can use CUBEMEMBER functions in Excel to return the Description of a given ID.

So say I want to enter an ID in cell A5 and have the description come back in B5.

I was wondering how this could be done and/or if there is any other way to lookup data in the data model in an Excel worksheet?

Thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
This article describes a workaround for creating the results of the CUBEMEMBERPROPERTY-function in Power Pivot (where this function is missing).
 
Upvote 0
I suggest you write a DAX measure that returns the description. Something like this.

MyDescription=if(hasonevalue(table[ID]),values(table[Description]))

The above will return the description when there is a single value for ID

Then in Excel, write a cubevalue formula that calls this measure (from memory - I'm not at my PC)

=cubevalue("ThisWorkbookDataModel","[measures].[myDescription]","
.[ID].&["&A5&"]")

put a valid ID in cell A5 and keep your fingers crossed.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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