on 12-07-2011 12:56 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Use following condition
(((X # 0)((X-ABS(Y))/X)) AND ((X = 0)(ABS(Y)))
Regards
Jagadeesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.