Formatting an integer to a currency

An easy way to display an integer as a currency with an expression.

Ex: 1274628.38 to $1,274,628.38

hello @nspradley, thanks for posting!! I agree that this would be a useful feature.

in the meantime, have you considered using some Data Manipulation to do this conversion?? here’s a quick sample of one way to do this:

Is there a way to do something similar within an analytic?

Honestly currency should be a 1st class data type in Tulip, or at least have a NUMBERTOCURRENCY() funtion.

I got this far and it’s a valid expression but I’m getting Analysis Failed: Unknown reason or something like that:

'$' + if(len(totext(round(sum(@MRB Inventory Order Value )))) > 3, left(totext(round(sum(@MRB Inventory Order Value ))), len(totext(round(sum(@MRB Inventory Order Value ))))-3) + ',' + right(totext(round(sum(@MRB Inventory Order Value ))), 3), totext(round(sum(@MRB Inventory Order Value ))))

Edit: I’m on LTS 10

@stefan, any idea why this analysis would be failing or why it would be throwing that error code?