Select to view content in your preferred language

label large dollar numbers

391
3
12-21-2024 02:50 PM
AllenKieslich
New Contributor

label large dollar numbers ex.1745987123.4567 to be $1.75B, or 756984 to be $.76B I know about round(), and currency and mid() cant get them to show what i want.

Tags (1)
0 Kudos
3 Replies
BarryNorthey
Frequent Contributor

If all your values are in billions something simple like this should work in Arcade where SHAPE_Area is my number field:

"$" + round($feature.SHAPE_Area/1000000000, 2) +"B"

To pad trailing zeroes for two decimal places:

Text($feature.SHAPE_Area/1000000000, '$#,###.00')+"B"

A problem arises if you have smaller numbers such as 756984 that would return $0.00B. In this case you might want to create a second label class and filter to label only an acceptable range of values and adjust its label say for millions:

Text($feature.SHAPE_Area/1000000, '$#,###.00')+"M"

If you create a second label class, make sure that the first label class filters out the values from the second or you will get two labels.

 

AllenKieslich
New Contributor

Thanks Barry, excellent info, will give it a try. it would be nice if the feature Symbol and label could be the same. You would not need code, making it newer user friendly. Tx again.

0 Kudos
BarryNorthey
Frequent Contributor

Text($feature.SHAPE_Area/1000000000, '$#,###.00B') should work as well as:

Text($feature.SHAPE_Area/1000000000, '$#,###.00')+"B"

0 Kudos