CUBERANKEDMEMBER and CUBESET with Multiple Criteria

ExcelNate

New Member
Joined
Dec 20, 2012
Messages
6
This formula works in my spreadsheet:

=CUBERANKEDMEMBER("ThisWorkbookDataModel",CUBESET("ThisWorkbookDataModel","{([KPCalendar].[CalendarYear].&["&YEAR($C$247)&"],[KPCalendar].[CalendarMonth].&["&MONTH($C$247)&"], [FinancialSummary].[Location].&["&$A$247&"],-{[FinancialSummary].[Referring Group].[Internal]}, [FinancialSummary].[Referring Physician].children)}","Needs Name",2,"[Measures].[YTD New Patients]"),ROW()-ROW($A$192))

But this formula returns #N/A:

=CUBERANKEDMEMBER("ThisWorkbookDataModel",CUBESET("ThisWorkbookDataModel","{([KPCalendar].[CalendarYear].&["&YEAR($C$247)&"],[KPCalendar].[CalendarMonth].&["&MONTH($C$247)&"], [FinancialSummary].[Location].&["&$A$247&"],-{[FinancialSummary].[Referring Group].[Internal]}, [FinancialSummary].[Referring Group].children)}","Needs Name",2,"[Measures].[YTD New Patients]"),ROW()-ROW($A$192))

I think the difference between the two formulas is that I am trying to filter out [FinancialSummary].[Referring Group].[Internal] and the second formula also references [FinancialSummary].[Referring Group] a second time.

I have tried several different ways to adjust the syntax of the second formula to rank Referring Group by YTD New Patients while filtering out the Referring Group category Internal, but can't seem to get the syntax right.

I have created a simplified version of the spreadsheet here:


There are several potential workarounds with GETPIVOTDATA, INDEX and MATCH, etc., but the actual spreadsheet has maybe 20 tabs and hundreds of CUBEVALUE functions. There has to be a way to get CUBESET to reference the same column twice.

Any suggestions would be much appreciated.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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