Cubeset and CubeRankedMember interaction question

DWig

Board Regular
Joined
Sep 26, 2012
Messages
77
Hi all.

I have a set of GL accounts that I am using as the driver for my financial models - the first account is 1010. The GL description for this account is "petty cash".

There is also a set of GL descriptions, which I am trying to set up where they always show the proper description for the proper account. The first one in alphabetical order is "401k match". This comes up later.

My numerical account set is defined by =CUBESET("PowerPivot Data","[GLAccounts].[GLAccount_Code].children","Set of GL Accounts",5). This is in cell A2. This works properly.

My description set is defined by =CUBESET("PowerPivot Data","[GLAccounts].[Description].children","Set of GL Descriptions",1,"[GLAccounts].[GLAccount_Code]"). This is in cell A4.
From what I can tell, this means "Get a unique list of the GL descriptions, and sort it in ascending order by GL account code."

Looking for the first member of the numerical set, I enter =CUBERANKEDMEMBER("PowerPivot Data",A2,1). This displays 1010, which is correct.

Looking for the matching description for this GL account, which should be the 1st member of the GL description set (because it is supposedly sorted by account code), I enter =CUBERANKEDMEMBER("PowerPivot Data",A4,1). This displays "401k match", which is incorrect. It should be displaying "petty cash". Instead of displaying the value associated with the first GL account code (which I defined as the sorting variable) it is displaying the first alphabetical account description.

I have been trying different variations on this for the past three hours or so. I could copy and paste it into the back of my workbook and run lookups, but I'm trying to minimize file size, and these formulas will be duplicated well over ten thousand times.

I hope my explanation makes sense. I have found very little online in the way of troubleshooting the relationship between cuberankedmember and cubeset. I'm absolutely stumped.

Thanks in advance,
DWig
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I think you need to define a measure/calc column that is something like MAX(Account Code) and use *that* as your sort value. Non-measure fields always sort inherently as text/alpha.
 
Upvote 0
That looks like an interesting approach. I actually went with a different workaround which didn't require the sorting as I was using it previously. Thank you for the information though.
 
Upvote 0

Forum statistics

Threads
1,223,959
Messages
6,175,647
Members
452,663
Latest member
MEMEH

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