@JavierBlanco the syntax you’re using is only supported in >=4.2. From the documentation:
What this means is, in older versions, you would have to do some old school Maths to get the desired “truncation to a specific number of decimal places” effect, otherwise, it will truncate to a whole number.
Old school Maths —> truncate 123.456789 to 3 d.p.:
// Shift decimal point by 3 places to the right
123.456789 * 1000
// Truncate to a whole number
// Shift decimal point by 3 places to the left
123456 / 1000
// Result is the number truncated to 3 d.p.
Result = 123.456
NB: You can perform steps 1 and 2 inside the
$trunc function… as per the screenshot, it can accept expressions.