cancel
Showing results for 
Search instead for 
Did you mean: 

IF ELSE condition in Universe for Source: SAP-BEX query

Former Member
0 Kudos

I have similar question related to the thread below.

We are using B XI 3.1 version:

I have need to incorporate following formula in BO-Universe for SAP-BEX query

Margin Ratio = if(sum([Margin Indicator])=0; 0; sum([Profit])/sum([Margin Indicator]))

I know that we need to use MDX/XML tags <EXPRESSION> </EXPRESSION> for this.

Could anyone tell me how to incorporate the above formula in Universe.

Thank you in advance.

- Anil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you Didier for clarifying.

Former Member
0 Kudos

Can we apply an IF THEN ELSE logic for a custom dimension object within an SAP BW OLAP Universe?

if Char A value is # THEN Use Char B Value ELSE use Char A.

Can this be implemented in a BW Universe?

Thanks.

Former Member
0 Kudos

Hi,

Can you give more details with concrete samples of what you want to do?

FYI, SAP MDX has limitations regarding the values returned in a calculated expression: no date and no string (except in very limited cases).

Didier

Former Member
0 Kudos

We have a field in the BW query Cust Report group (BW Info Object [ZSHPTO__ZCSRPTGRP].[LEVEL01]), if the value of the field is blank or # we want to populate this with the payer information [0PAYER].[LEVEL01].

Both of them are dimensions and character type within the Universe.

Thanks.

Former Member
0 Kudos

Hi,

The correct syntax is:

<EXPRESSION>IIF(sum(Margin Indicator)=0, 0, sum(Profit) / sum(Margin Indicator)) </EXPRESSION>

You must check that Margin Indicator and Profit are valid MDX expression.

Here is a sample of valid MDX expression for a measure / key figure.

[Measures].[0D_NETVAL_S]

Didier

former_member203168
Active Participant
0 Kudos

Hi Didier,

I have created an object with below logic

<EXPRESSION>IIF(@Select(Posting period\L01 Posting period)="10",1,2)</EXPRESSION>

But it is always giving me the else part.. it is not comparing period with static values.

Please advise me..

--Praveen G