cancel
Showing results for 
Search instead for 
Did you mean: 

BEX Formula assistance required !

Former Member
0 Kudos

HI Viewers,

Could you please help me on this formual. how to to put in BEX syntax.

IF ( X # 0) THEN ( X- ABS ( Y)) / X ELSE ABS ( Y).

Appreciate your support on this !

Thanks

Surendra

Edited by: Surendra Kumar on Dec 7, 2011 1:57 PM

Accepted Solutions (1)

Accepted Solutions (1)

gunesbt
Active Contributor
0 Kudos

Hi,

You need to use Boolean Operators in your formula.Just create a formula , right click on it and go to Boolean Folder.You will find necessary operators there(like not equal,equal,not etc).Boolean syntax is like this: (Condition)(Result1)+Not(Condition)(Result2).This says if condition satisfied then do result1.Else do result 2.There is no else in BEx.That's why I used NOT(Condition) instead.By the way ABS function is under mathematical functions.Consequently, your formula will be like this:

(x not equal 0)(x-abs(y))/x + (x=0)abs(y)

These threads explain your requierement in details:

Regards,

Sunny

Edited by: sunnybt on Dec 7, 2011 2:43 PM

Answers (4)

Answers (4)

jagadeesh_mandepudi2
Active Contributor
0 Kudos

Hi

Use following condition

(((X # 0)((X-ABS(Y))/X)) AND ((X = 0)(ABS(Y)))

Regards

Jagadeesh

raj_sharma
Explorer
0 Kudos

Hi

Please use below formula for your requirement:

(X< >0)*((X-ABS(Y))/X)+ABS(Y)

Make use of boolean operator for not eqaul to (< >) and replace X and Y with whatever your variables (if any).

Regards,

RJ

Edited by: SHARM RAJ on Dec 7, 2011 3:17 PM

Edited by: SHARM RAJ on Dec 7, 2011 3:17 PM

anshu_lilhori
Active Contributor
0 Kudos

Hi,

Please try a condition like this:

(X <> 0 )* (X- Abs (Y))/X + (x == 0) * ABS(Y)

Note: Make use of boolean operators for equal and not eqaul to.

  • means then and + means else in bex if else conditions.

Brackets are also imp.which system usually take care on its own.

Hope it helps.

Regards,

AL

Edited by: AL1112 on Dec 7, 2011 3:14 PM

Former Member
0 Kudos

Hi,

In Bex If condition will be like this.

If starts with ( ) and Then is * and Else is +.

As per your requirement IF ( X # 0) THEN ( X- ABS ( Y)) / X ELSE ABS ( Y).

In Bex you can write like this in formula ( (X # 0) * ( X- ABS ( Y)) / X + ABS ( Y) )

Thanks

Riyez