Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm having a problem, described below, with Field Calculator in ArcGIS 10. I wonder if there is a known fix at this point. I'm updating to 10.1 soon, but this work cannot wait until then.

Details: I'm trying to divide two fields and then multiply the answer by 100 into a calculated field. I have created a field to receive the answers, "Grad_Per". I highlight the [Grad_Per] field, right click, select Field Calculator, and enter [elev_range]/[SLength]*100. Answers then populate the Grad_Per field down to record number 564 but no further. The answers up to that point are correct; I've checked them in MS Excel and by hand. It's just that I've got about 9500 more records to calculate and they have values of 0 after the calculation is complete.

Thanks so much for your help,

Vin

share|improve this question
1  
Can you provide some specifics on what you are attempting to do and what outcome you are experiencing? –  egdetti Feb 21 '13 at 23:29
2  
Thanks for the replies! So what I'm trying to to is divide two fields and then multiply the answer by 100. I have created a field to receive the answers, "Grad_Per". I highlight the field, right click, select Field Calculator, and enter [elev_range]/[SLength]*100. Answers then populate the Grad_per field down to record number 564 but no further. The answers provided are correct; I've checked them in MS Excel and by hand, it's just that I've got about 9500 more records to calculate and I just get 0 for them. –  Vin D'Angelo Feb 21 '13 at 23:44
2  
Do you have rows selected? If so, it will only calculate the selected rows. Try removing the selection and try again. –  Fezter Feb 21 '13 at 23:58
2  
This is vague complaint and not an answerable question. The field calculator in ArcMap 10.0 is extremely unlikely to have bugs. It's user error or data problems. –  awesomo Feb 22 '13 at 2:07
3  
What are the data types for [elev_range], [SLength] & the field that you are calculating on? –  Devdatta Tengshe Feb 22 '13 at 3:52
show 4 more comments

1 Answer 1

up vote 1 down vote accepted

Does [SLength] = 0 in record #565? If so, it is a division by zero error.

I'm not sure why the software didn't return an error message, and why it calculated all subsequent values as 0. Probably worth a bug report to Esri. I don't know if setting SLength to "Null" instead of 0 will avoid this.

Regardless, if you select all the rows where [SLength] is not 0 then perform the calculation, you will get results in all possible rows.

share|improve this answer
    
@Vin D'Angelo - thanks –  user3461 Mar 15 '13 at 18:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.