on 09-09-2008 7:51 PM
I am finding the SAP BW based universe a totally different animal so far and my question comes from my inexperience in this domain.
In a normal universe, one can use CASE Statement and Calendar or Time table to help do these calculations. Since BW based universes are based on a super BEx query, how are these calculations done in the universe? Are these calculations done in the BEx query itself?
Are there any standards of what should be handled on the BEx side vs. what should be handled on the Universe side?
Also, what's the syntax of a CASE statment or using Substring (or similar function) in a BW universe?
Thanks!
Hi,
You can define calculated measures in OLAP universes using MDX language.
To define a Calculated Measure, users must create manually new Measures in the Universe.
Calculated Measures definitions are using MDX functions embedded in XML tags.
In order to create calculated measures, users must to create pure MDX expression emclosed in XML tags: <EXPRESSION></EXPRESSION>
In this new expression, we authorize to use any Designer function such as:
u2022 @SELECT
u2022 @PROMPT
u2022 @VARIABLE
The check integrity will validate the XML syntax and any of the Designer functions described above.
No MDX parser is provided in this version of Universe Designer.
This paragraph describes how to define calculated measures in MDX and using @Select and @Prompt functions.
CASE statement is not supported in MDX but you can use IIF statement instead of.
It is important to notice that the result of a calculated measure/member in SAP BW (using MDX) must be numeric due to a current limitation f the SAP MDX engine.
Here is 2 samples of an MDX expression using YTD:
<EXPRESSION>
SUM(YTD(@Select(Key Figures\Billed Quantity
</EXPRESSION>
<EXPRESSION>
SUM(YTD([Measures].[D3B1M57O3MN5499LF2X9UNHKA]))
</EXPRESSION>
Regards,
Didier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
I would like to have following syntex in BW Universe, the same has been created and worked fine in RDBMS universe.
case
when RAG_Status_New.Description = 'Green' then @Select(Internal Variables\Green Sphere Image)
when RAG_Status_New.Description = 'Amber' then @Select(Internal Variables\Amber Sphere Image)
when RAG_Status_New.Description = 'Red' then @Select(Internal Variables\Red Sphere Image)
end
The @Select(Internal Variables\Green Sphere Image) and other variables are also not coming from BEX but created in universe using 'boimg://redsphere.gif' syntax.
How do I do this using MDX syntax? Please reply this asap, as we are running against the timeline.
Cheers,
Bhavesh
Here are a lot of examples:
Thanks to Didier!
Joachim
Hi Bhavesh,
You can do such expression with Microsoft Analysis Services 2005.
See example on AdventureWorks:
CASE MemberToStr([Product].[Product Categories].CurrentMember)
WHEN "[Product].[Product Categories].[Category].&[4]" THEN "AAA"
WHEN "[Product].[Product Categories].[Category].&[3]" THEN "BBB"
ELSE "CCC"
END
Unfortunately in SAP such syntax is not supported.
You can use IIF statement instead of CASE but unfortunately again calculated measures or calculated members in SAP BW MUST return numeric values: this is one of the main MDX limitations in SAP.
Regards,
Didier
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.