Floating Point Number With Precise Decimals

I’m trying to output a number with exactly two decimal points (basically currency in number form). I’m running into the issue where something like ‘120.60’ would become 120.6 as a number. I’d like to have it always output two decimal points. How can I accomplish this?

I attempted to use Ruby’s sprintf method, but looks like I’m not able to do so here.

It’s definitely possible for me to manipulate this data in my project, but I’m hoping I don’t need to.

Hmm… interesting… it should probably produce two decimal points by default. I’ll see if I can fix that. In the meantime, here’s a workaround you can use:

It uses the following inline formula (the f(x) button) to pick apart the number and pad the decimal:
parts = this.to_s.split(/\./) parts[0] + '.' + pad(parts[1], 2, '0', 'right')