Round up value in indicator using Arcade

497
4
Jump to solution
11-20-2023 10:52 PM
Labels (1)
MicBry
by
New Contributor II

Hi!

I am using arcade in an ArcGIS Dashbard indicator (enterprise not AGOL) to round my result to a whole number. I have successfully removed my decimal points, but i would like the function to always return the higher whole number.

Example: I would like the value 21.1 to be rounded to 22, not 21. 

Is there a way to do this? 

0 Kudos
2 Solutions

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

"old school" take the integer of a number plus 0.5

int(number + 0.5)


... sort of retired...

View solution in original post

KenBuja
MVP Esteemed Contributor

The Ceil function rounds a number up.

View solution in original post

4 Replies
DanPatterson
MVP Esteemed Contributor

"old school" take the integer of a number plus 0.5

int(number + 0.5)


... sort of retired...
MicBry
by
New Contributor II

Thank you!

0 Kudos
KenBuja
MVP Esteemed Contributor

The Ceil function rounds a number up.

MicBry
by
New Contributor II

Thank you! I tried this and it was the perfect soulution for my indicator. 

0 Kudos