Calculate Field tool

1873
6
Jump to solution
11-01-2021 04:04 PM
KateEkhator74
New Contributor III

Hello 

Am trying to calculate the percentage area of the land cover classes in my map and keep on getting this error message (see attached). I tried changing the setting when adding the new field (percentage) so that I can click on the allow null, but it is greyed out. I tried clicking on the error message and it tells me there is no solution at this time. 

Please can anyone help?

Thanks.

0 Kudos
2 Solutions

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

comma could be localization


... sort of retired...

View solution in original post

KateEkhator74
New Contributor III

This worked, thanks.

View solution in original post

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

Do you have any records with null values in that field?

I would add a new field (eg double, Area2, make sure it isn't nullable)

Then try the expression again.


... sort of retired...
0 Kudos
KateEkhator74
New Contributor III

The percentage field had zeros (0) after I added the field (see attached), made sure data type was double. I can't edit the column for null when adding field. It opens greyed out.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Could you delete the comma in the denominator (15675.2), and try again?



Think Location
0 Kudos
DanPatterson
MVP Esteemed Contributor

comma could be localization


... sort of retired...
KateEkhator74
New Contributor III

Thanks, removed comma and it worked.

0 Kudos
KateEkhator74
New Contributor III

This worked, thanks.

0 Kudos