Visualisations Math.Round Math.celi wrong values

2.17.1

Hi,

I’ve encountered an issue when trying to round values in Advanced.

For example, I have a value in seconds, which I convert to minutes per gamer_id. I use a script to perform the conversion:

json

{"script": "_value / 60"}

However, when I attempt to round the result to a whole minute using Math.round or Math.ceil, the output is not as expected. For instance, 6116.533 is rounded to 6095, and using Math.ceil returns 6990.

Here are the scripts I’m using:

json

{"script": "Math.round(_value / 60)"}
{"script": "Math.ceil(_value / 60)"}

Could you help me understand why these rounding functions are giving unexpected results?

Relevant Logs or Screenshots: