Skip to main content

I need to consistently show 2 decimals, including when the number is a full integer, or only has 1 decimal. Searching the forum I found references to custom_display_format, but I have no idea how/where to implement it.

 

For example, here it should be 2.25, 1.00, 2.00 and 1.50:

Example without trailing zeros

 

Alternatively I could use a calculated field, but converting numbers to strings in sql for this purpose would be inefficient (and a lot of extra work and complexity), so I'd like to avoid it.

Hi ​@jkruter, I attempted to replicate the above scenario using a numeric data type with the scale set to 2;


 and when I enter 1.00 as a value then it sill displays the 2 decimal points as part of the output value. Please clarify which data type you are using in your example.


Hi ​@Nathan, thank you for looking into it!

I was using a decimal:
 

As far as I can see there is no functional difference, other than that decimals might allow number bigger than 6 characters, somehow.

 

I changed it to NUMERIC, and it works just like you said, thanks!


Reply