How to group the number by thousands using Arcade in labels?

3006
4
Jump to solution
07-14-2017 09:26 PM
MilaAlvarez
New Contributor III

I am creating labels for a map in AOL using Arcade. The field is numeric, but when I round it, the thousand coma does not appear in label. Here is the expression I am using:

round(number($feature.MfgShip_perAc_allTim), 0) + " $/acre"

It prints:

1045 $/acre

How do I get it to print 1,045 $/acre?

I am not a developer, just a user trying to learn how Arcade works.

Thank you!

Mila

 

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

Try using the Text formatting to insert the comma. For example: 

Text(Round(Number(1045),0),"#,###") + " $/acre"

View solution in original post

4 Replies
KellyHutchins
Esri Frequent Contributor

Try using the Text formatting to insert the comma. For example: 

Text(Round(Number(1045),0),"#,###") + " $/acre"

MilaAlvarez
New Contributor III

Thank you so much Kelly,

You made my day!!!

Mila

0 Kudos
MilaAlvarez
New Contributor III

Hi Kelly,

I was wondering if Arcade also allows you to add color to part of your

label. Here is what I am trying to show in my label:

1.2M

(25k)

Text(round(number($feature.WUI_Houses/1000000),1), "#,###.#") + Text("M")+

TextFormatting.NewLine + Text("(") +

Text(round(number($feature.WUI_Seas_H/1000),0), "#,###.#") + Text("k") +

Text(")")

I need to learn how to code color red for the second label. Using ArcPro

Many thanks!

Mila

0 Kudos
XanderBakker
Esri Esteemed Contributor
0 Kudos