Question
Ashok S · Nov 30, 2016

Accessing Deepsee plugin in MDX

Dear All,

From my web page, i am passing filter values to mdx query.

when mdx executes, i am getting Error #5001: Invalid member expression: empty name(2).

when i try the same in samples namespace (patient cube). I got the same error.

Below is my sample MDX from patients cube.

SELECT 
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT") 
ON 1 
FROM [PATIENTS] 
%FILTER %OR([HOMED].[H1].[ZIP].&[32000])

Result: 0   This works fine.

 

SELECT 
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT") 
ON 1 
FROM [PATIENTS] 
%FILTER %OR([HOMED].[H1].[ZIP].&[32006])

Result: 13   This works fine.


Now, when i try to access both 32000 and 32006. I got error.

SELECT 
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT") 
ON 1 
FROM [PATIENTS] 
%FILTER %OR({[HOMED].[H1].[ZIP].&[32000],[HOMED].[H1].[ZIP].&[32006]})

What should I do to get HighScoreCount as 13 while accessing both 32000 and 32006 zipcode?

Below is the screen shot from samples namespace(patient cube)

 

Any Idea on this?

00
2 0 3 261
Log in or sign up to continue

Replies

SELECT
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT")
ON 1
FROM [PATIENTS]
%FILTER ([HOMED].[H1].[ZIP].&[32006],[HOMED].[H1].[ZIP].&[32006])

Or, with %OR:

SELECT
NON EMPTY %KPI("PluginDemo","HighScoreCount",,"%CONTEXT")
ON 1
FROM [PATIENTS]
%FILTER %OR({[HOMED].[H1].[ZIP].&[32006],[HOMED].[H1].[ZIP].&[32006]})

It looks like this error is happening when a key that does not exist is passed into the PlugIn through %CONTEXT. Would it be possible to only pass in Keys for members that exist? This seems to work without errors

Hi Peter,

When i try with single value filter, I didn't get any error. Lets say.

%FILTER %OR([HOMED].[H1].[ZIP].&[32000])

Here 32000 is not a member. This executes fine and i got result 0 without any error.


When trying with multiple value filter, if any non member exists in filter thrown error.

if all are member in a filter, works fine.

Is there any way to restrict this?
Front end user will select anything in filter. But it should work.

32000(non member) gives result 0. 
32006(member) gives result 13.

if user selects 32000 and 32006, it should give (0+13=13).