You can use the formatDecimal function. Try this…
Behind the scenes this is using the Java DecimalFormat, so you can find more details on the characters you can use in that documentation.
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
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/