on 09-17-2009 10:30 PM
Hi all,
I need help on writting MDX to create my own keyfigure on the universe. The key figure has to be created using existing keyfigure in the universe but with restriction on version or value type etc. Any help regarding this is appreciated.
Thanks,
Hema
Hello All,
In regards to the above question I have created a keyfigure but I am having difficulty with MDX syntax, any help in correcting this is greatly appreciated.
The below listed expression works fine,
SELECT: <EXPRESSION>(@Select(Sales\Sales))</EXPRESSION>
WHERE: <FILTER KEY="[0VERSION].[LEVEL01]">
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT NAME="10"/>
</CONDITION></FILTER>
But when I try to include another filter, it throws an error,
SELECT: <EXPRESSION>(@Select(Sales\Sales))</EXPRESSION>
WHERE: <FILTER KEY="([0VERSION].[LEVEL01] , [0CURTYPE].[LEVEL01])">
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT NAME="(10,10)"/>
</CONDITION></FILTER>
Thanks,
Hema
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can create a filter expression as:
<OPERATOR VALUE=AND>
<FILTER "0VERSION.LEVEL01"> (Object's Exact Definition)
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT CAPTION=10>
</CONSTANT>
</CONDITION>
</FILTER>
<FILTER "0CURTYPE.LEVEL01"> (Object's Exact Definition)
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT CAPTION=10>
</CONSTANT>
</CONDITION>
</FILTER>
</OPERATOR>
Regards,
Rohit
Edited by: rohit12 on Sep 18, 2009 10:58 AM
Hi,
Writing a restricted key figure is easy using MDX. You don't have to write your expression in the same way you would have to do it using SQL.
So you don't have to create a filter or fill the where clause of the object.
The MDX syntax is like this:
<EXPRESSION>([measures].[measure definition], [dimension 1].[member uniquename], ... [dimension n].[member uniquename])</EXPRESSION>
So in your case, the syntax will be:
<EXPRESSION>(@Select(Sales\Sales), [0VERSION].[10], [0CURTYPE].[10])</EXPRESSION>
Please check that unique name for the version an curtype is 10, otherwise replace by the correct value.
Regards,
Didier
Didier,
Thanks for your suggetion. That solved my problem. I tried the same expression yesterday but didnt happen to use exact unique value for the object (for )version I was using "10" instead of "010") so it was throwing errors and I couldnt relate the error and was under assumption that I have to write a where clause instead. Thanks again for clarifying this.
Regards,
Hema
SELECT: <EXPRESSION>(@Select(Sales\Sales))</EXPRESSION>
WHERE: <FILTER KEY="0VERSION.LEVEL01">
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT NAME="10"/>
</CONDITION></FILTER>
But when I try to include another filter, it throws an error,
SELECT: <EXPRESSION>(@Select(Sales\Sales))</EXPRESSION>
WHERE: <FILTER KEY="(0VERSION.LEVEL01 , 0CURTYPE.LEVEL01)">
<CONDITION OPERATORCONDITION="Equal">
<CONSTANT NAME="(10,10)"/>
</CONDITION></FILTER>
1) To simply you question, you used webi Variable to resolved
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.