You can use the formatDecimal function. Try this…
formatDecimal($material/quantity, '#,##0.00')
Behind the scenes this is using the Java DecimalFormat, so you can find more details on the characters you can use in that documentation.
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/DecimalFormat.html
Good luck!
Hi!
You will have to manipulate this in a microflow, where you can check if the number has .00 at the end then round it off and save that value, otherwise display the decimal number
Hi Yin
In your datamodel, you can alter the precision. Furthermore, in the documentation you’ll find that you can alter the output via functions: https://docs.mendix.com/refguide/parse-and-format-decimal-function-calls/
Kind regards,
Leander