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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

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