cancel
Showing results for 
Search instead for 
Did you mean: 

IF Function

Former Member
0 Kudos

Could someone please tell me how to calculate a simple "IF" function (just like in excel) on two key figures?

For example, in an excel spreadsheet I have:

IF(I2<0,G2,H2)

I want to create this same function on two key figures in BEX...

As always, thank you in advance for your help!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188975
Active Contributor
0 Kudos

Hi Shelly,

You can formulate IF THEN ELSE conditions in BEx formulas using the boolean operators.

An expression in the form

IF<Logic Expression> THEN <Expression1> ELSE <Expression2> can also be made using a formula in the form

(Logic Expression) * (Expression1) + NOT (Logic Expression) * (Expression2)

Take a look at this link fo rmore info:

http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm

Hope this helps...

Former Member
0 Kudos

Thank you very much!

Former Member
0 Kudos

Under my BOOLEAN Operators, I do not have the option for LEAF (I have all of the other ones, ie, Logical NOT, etc.)?

former_member188975
Active Contributor
0 Kudos

Hi Shelly,

I can see this option in my system...what is your BW version?

Former Member
0 Kudos

I'm using:

SAP Netweaver Business Explorer Query Designer, final release: 3.50, version: 3500.1.542.

I have Boolean Operators, I just don't have the IF-THEN-Else as options...

former_member188975
Active Contributor
0 Kudos

Hi Shelly,

The IF THEN and ELSE are not present as such...I mean you cannot find any option in the formula designer named as IF THEN or ELSE...you can create conditional expressions using the Boolean operators and () and * that are evaluated as IF THEN and ELSE.

Hope this helps...

Former Member
0 Kudos

Yes, that worked, just as in the example you gave me in your first reply. Thank you!