Select to view content in your preferred language

Round up value in indicator using Arcade

891
4
Jump to solution
11-20-2023 10:52 PM
MicBry
by
Emerging Contributor

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
Emerging Contributor

Thank you!

0 Kudos
KenBuja
MVP Esteemed Contributor

The Ceil function rounds a number up.

MicBry
by
Emerging Contributor

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

0 Kudos