Can only figure out how to do it by converting into a string which defeats the purpose since then you can't do any quantitative analysis on it.
Solved! Go to Solution.
Hey Kessa, I think you can do something like this:
After clicking "configure popup" for the layer you want to show percentages, you can click ADD under Attribute Expressions. Then just choose the field you want to show with the percentages by clicking it once. This should add it to the script box. Then on the same line you can enter this: + "%"
When I did it to test, it looked like this:
It worked for me so I'm thinking this should do the trick for you.(This was after I clicked test to see if it worked)
Hey Kessa, I think you can do something like this:
After clicking "configure popup" for the layer you want to show percentages, you can click ADD under Attribute Expressions. Then just choose the field you want to show with the percentages by clicking it once. This should add it to the script box. Then on the same line you can enter this: + "%"
When I did it to test, it looked like this:
It worked for me so I'm thinking this should do the trick for you.(This was after I clicked test to see if it worked)
this is why Arcade expressions so awesome!
What if you wanted only a certain number of significant values, for example I want 55.00000000000001% to just be 55.00% , is there an expression to do that?
To adjust how many numbers display after the period, go to Configure Pop-Up --> Configure Attributes --> Click on the Attribute you want and a format box should show on the right where you have the ability to adjust how many numbers display after the period.
Hello,
How did you get your number 5.55555555% down to 5.55%? I'm having the same problem in the popup.
thank you!
This thread is a little old at this point, but you can use the built-in "round" function. The "Configure Attributes" solution won't work since we're working with strings/text.
Unfortunately, you cannot sort a table with this column, so there's a bit of a trade-off.
I have a decimal number (.11) in a table and want to convert it to a percentage. In arcade I did something like this
($feature.field*100) + "%"
which worked for quite a few numbers except for .11 which turns into this 11.110000000000001%. How do make sure it stays to two decimals? I've tried change the decimal like the image above but it didn't work.
thank you!