cancel
Showing results for 
Search instead for 
Did you mean: 

Result row is giving the wrong value

Former Member
0 Kudos

Hello,

I have this problem where the result row doesn't show the correct value. It's the orange value that should be 80% but instead it displays 125?

Since there is not much to configure (at least to what I know) I've no idea why this is happening?

Any help will be appreciated!

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

anshu_lilhori
Active Contributor
0 Kudos

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

Former Member
0 Kudos


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

former_member194898
Active Contributor
0 Kudos

Hi Bart,

There're some documents in SCN on if then else in BEx.

eg.

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

Former Member
0 Kudos

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

former_member194898
Active Contributor
0 Kudos

Hi,

(It looks you know c# (in general C family) ) nice !!!

I would write:

( column2 <= column1 ) * ( NDIV0( column2 %A column1 ) ) + ( column2 > column1 ) * 999

I don't know how operator %A works.

Thanks to using NDIV0() you avoid exception raised while result  = 0

Regards, Leszek

Former Member
0 Kudos

Hi Leszek,

I'm studying Java actually,

When I can test the formula I will let you know if it worked,

but it looks like it's going to work !

Thank you

former_member194898
Active Contributor
0 Kudos

Hi,

(In case sth goes wrong)

Regards, Leszek

Former Member
0 Kudos

I've found the problem, there is a problem with the formula that is causing this to happen, thanks for the replies

former_member223480
Active Contributor
0 Kudos

Hi there

This seems to be a percentage function do you have any aggregation running in those calculations?

Thank you

Yiannis

anshu_lilhori
Active Contributor
0 Kudos

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