Hello GIS friends,
I'm doing a simple calculation using arcade expression for an Attribute rule in ArcGIS Pro. I got the calculations to work, however I'm not knowing how to round up the integer value to the highest number. Both the field types are integer and not double. Also, the field where the output gets calculated is type integer.
Example: Average of (50+51) = 51 when you round up to the highest number, but I'm getting 50 with the expression I'm using.
Here is my expression: Mean($feature.Field1,$feature.Field2)
Thank you,
Abi
@AbiDhakal try: Round (Mean($feature.Field1,$feature.Field2))
@AyanPalit, that does not seem to work Ayan. With your expression:
Round (Mean($feature.Field1,$feature.Field2))
The average of two integers (214+215) = 214 instead of 215
Thank you,
Abi
Hello @AbiDhakal
Ceil(Mean($feature.Field1,$feature.Field2),0)
https://developers.arcgis.com/arcade/function-reference/math_functions/#ceil
"Returns the input value rounded upwards to the given number of decimal places."
Gives the result 215 when Field1 is 214 & Field2 is 215.
Hello@ChrisUnderwood
Good morning and happy Friday to you! My apology for the late response, Chris. I was only able to get to it this morning. The expression worked great. Thank you!
Also, I used 'Ceil' on a subsequent expression, but that part didn't work for me.
Here is what I did and on this one it didn't work.
Ceil(Sum($feature.Field1,$feature.Field2,$feature.Field3*.25),0)
Thank you,
Abi