on 02-27-2008 7:40 AM
Hi,
Why there is no IF, ELSE function in BEx Query Designer?
Assuming I need to write the following logic, how can it be accomplished?
IF (A=0 OR B=0)
THEN 0
ELSE IF ( B/A <0)
THEN ' *'
ELSE
B/A * 100
i.e.
if A or B is equal to 0, then display the value of 0
else if B is negative (as A is either 0 or positive), then display the following text: ' *'
otherwise, display the value of B/A * 100
Thanks!
Hi,
You can achieve this by creating a new formula.
You have to use the boolean operations and mathematical functions. But we cannot display *. u have to display some value for that.
Khaja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Equal to is where you assign value (e.g. A =8 . Here A is assigned a value 😎
Is Equal to is a logical operation where you check whether a value is equal to or not (e.g. A ==8 . Here it checks whether A is equal to 8 or not. If the condition is true it returns 1 or returns 0).
As you said there is no way to populate * in the else part using a formula key Figure
You can create a Formula Key Figure and can use the Boolean Operators and Mathematical Functions to achieve your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.