on 11-07-2014 7:50 AM
So I have another question about this,
The result is calculated like this
column1 column2 column3
0 8 0%
8 8 100%
8 8 100%
8 8 100%
8 8 100%
result 125%
column 3 is based on what percentage column2 is of column1 that's why it gives 0%
And the resultrow is returning 125 because of 40/32
Now my question is can I create a condtion (or something else) that's like
if column2 > column1 -> column3 = 99,9
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can write if else condition at BEx level with the help of Boolean operators.
So in this case it would be something like this:
(column2 >column1 )* 99.9
* represents then
+ else
It would be great if you do a little search on this topic.I am sure you will get lot of documents,threads discussing the same in detail.
Regards,
AL
Hi AL,
The original formula to calculate the field was ( NDIV0( column2 %A column1 )
I've made it like this;
( column2 <= column1 ) * ( NDIV0( column2 %A column1 ) ) + 999
Do you think this wil give me the correct result?
(If you ask why I don't test it is because right now I can't for some reasons)
Maybe it's easier for you to understand if I tell you what the columns mean
column1 is how many hours a person should work and column2 is how many hours the person has worked and column3 is the percentage of this so people can see if the person has not worked enough hours. But the problem now happens that if a person workes on a day where he should not work that columns 3 displays 0% because 8 a% 0 = 0
Hi Bart,
There're some documents in SCN on if then else in BEx.
At first the function looks complicated but if you think how it counts it becomes simple. You can built even nesten conditions using it.
Remember that
- if a condition is true always returns value 1
- if a condition is not true (is false) it returns 0
In this way if you write (A > B) * A + (A < B) * B
If eg. A really is greater than B the function looks in this way: 1 * A + 0 * B
1 * A = A
Regards, Leszek
Hi Leszek,
I know how IF ELSE statements work because I'm a programmer student,
But because in BEx you don't wright IF ELSE it's new to me,
But could you tell me if the following formula gives me the desired effect
( column2 <= column1 ) * ( NDIV0( column2 %A column1 ) ) + 999
Like
If ( colum2 <= column1 ) {
(NDIV0 ( column2 %A column1))
} else {
column3 = 999
}
column3 is the outcome of this formula
I've found the problem, there is a problem with the formula that is causing this to happen, thanks for the replies
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there
This seems to be a percentage function do you have any aggregation running in those calculations?
Thank you
Yiannis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you brief us about the formula you applied on that column and how you are saying that it should be 80% instead of 125%.
Regards,
AL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.