Skip to main content
Question

Rounding error when dividing

  • May 30, 2019
  • 6 replies
  • 7 views

Hello, I was trying to get the Median of a column. But no matter which way he calculates, he just gives me a rounded number. Even if I enter the numbers manually, the correct solution would be 4.54. Anyone have any idea what it is? Rundungsfehler2.png938969 33.4 KB Rundungsfehler.png873927 50.9 KB Thank you in advance

6 replies

  • Level 0
  • May 31, 2019
Hi Sarah, Try to multiply the value within you median function with 1.0 . This will force Celonis to use the float datatype. In older versions it otherwise keeps it as integer. Best regards, Pol

  • Author
  • Level 4
  • May 31, 2019
Hi Pol, thank you for the tip. Unfortunately, the calculation remains at 4.00, even if the datatype actually adapts itself by multiplying it. Im also surprised that even when I entering numbers manually, I only get .00 value back. Have tried it in desktop version 4.4 as well as in cloud version. Best regards, Sarah

Hi @Sarah_ForThesis, in Celonis Process Mining 4.4 you should calculate it the following way: 141943.00/31248.00 If you would have used 141943.00/31248 (float divided by integer) then the result what have led to an integer and mulitplying it by 1.0 would also not have helped. The correct set up for the Single KPI should look in CPM4.4 that way (please also use ,.4f as the correct annotation) image.png14011217 94.1 KB In the Intelligent Business Cloud and CPM4.5 you should calculate it the following way to get your result with decimals. What is the difference to CPM4.4? The logic has changed and always an float is provide from the engine and not based on the datatypes you put in. image.png1123524 78.4 KB Hope that solves the issue on all products you are operating. Best Michael

  • Author
  • Level 4
  • June 1, 2019
Hello Michael, perfect, that fixes the problem, when I calculate with manual inputs. Thank you! If you also have any idea how it works on KPIs like Median or AVG let me know please. If not, at least I can work with manual inputs. Greetings Sarah

Forum|alt.badge.img+2
Hi Sarah, the Median should return a non-rounded value; it returns the middle element of a column. So I guess in your example from above, your median element is 4.00 For Average, you can multiply the column with 1.0 before applying AVG to get the float value: AVG("table"."column"*1.0) Best, David

  • Author
  • Level 4
  • June 7, 2019
Thank you David, that explains a lot. I was thinking the wrong way! Thank you all for your Help