Hi there,

I’m getting the wrong values in two different cases when I’m dividing in celonis:

**Case 1**:

(

Sum(

CASE

WHEN ((“EBAN”.“MENGE”)/(“EKPO”.“MENGE”)) < 1 THEN 1

ELSE 0

END)

+

Sum(

CASE

WHEN ((“EBAN”.“MENGE”)/(“EKPO”.“MENGE”)) > 1 THEN 1

ELSE 0

END)

)

/

(1.0*COUNT_TABLE(EKPO))

Individually the first sum evaluates to 455. The second sum evaluates to 249. the numerator is then 704. The denominator comes to 3555.

The output should then be 704/3555 = 0.19803…

But the output on Celonis is 0.2068762…

**Case 2:**

SUM(CASE WHEN ISNULL(“EBAN”.“FLIEF”) = 0 AND “EBAN”.“FLIEF” != “EKKO”.“LIFNR”

THEN “EKPO”.“MENGE”

ELSE 0.0 END)

/

SUM(“EKPO”.“MENGE”)

The numerator comes out to 4069455

The denominator comes out to 1521749967

The result should be 0.0026741…

The result is 0.0077356…

Any ideas what’s causing the wrong values?