# Formatting an integer to a currency

**URL:** <https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798>\
**Category:** Product Suggestions\
**Created:** [October 13, 2021, 3:05pm UTC](https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798 "2021-10-13T15:05:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nspradley](https://avatars.discourse-cdn.com/v4/letter/n/d2c977/32.png) [@nspradley](https://community.tulip.co/u/nspradley)\
**Post date:** [October 13, 2021, 3:05pm UTC](https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798/1 "2021-10-13T15:05:39Z")

</div>

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

Ex: 1274628.38 to $1,274,628.38

---

<div class="post-metadata">

**Author:** ![gio](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/gio/32/82_2.png) [@gio](https://community.tulip.co/u/gio)\
**Post date:** [October 13, 2021, 3:33pm UTC](https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798/2 "2021-10-13T15:33:56Z")

</div>

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:

 ![Screen Shot 6](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/f/f4f1d2ef7d6c390e9d7eaea37f5755d3ee0cfa86.jpeg)  
 ![Screen Shot 7](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/9/9a27768fd4044bc35028adb56f241f78cf2d2976.jpeg)

---

<div class="post-metadata">

**Author:** ![Richard-SNN](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/richard-snn/32/1166_2.png) [@Richard-SNN](https://community.tulip.co/u/Richard-SNN)\
**Post date:** [August 3, 2023, 2:45pm UTC](https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798/3 "2023-08-03T14:45:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Richard-SNN](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/richard-snn/32/1166_2.png) [@Richard-SNN](https://community.tulip.co/u/Richard-SNN)\
**Post date:** [August 3, 2023, 5:47pm UTC](https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798/4 "2023-08-03T17:47:27Z")

</div>

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

```auto
'$' + 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

---

<div class="post-metadata">

**Author:** ![John](https://sea2.discourse-cdn.com/flex020/user_avatar/community.tulip.co/john/32/4971_2.png) [@John](https://community.tulip.co/u/John)\
**Post date:** [August 3, 2023, 6:08pm UTC](https://community.tulip.co/t/formatting-an-integer-to-a-currency/3798/5 "2023-08-03T18:08:39Z")

</div>

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