Select to view content in your preferred language

relevant calculated fields are returning 0.00 when there is nothing to calculate and should be NULL

1158
13
08-22-2018 01:01 PM
LynnBerni
Frequent Contributor

In the following screenshot, the fields 5 & 6 are calculated based on data in fields 1-4. The whole group (fields1-6) is relevant as to whether or not a sample is collected. But, when no sample is collected, the calculated fields are returning 0.00. I would like them to be blank. Is there a way to control (cancel) the calculation when the relevant expression is not met?

0 Kudos
13 Replies
LynnBerni
Frequent Contributor

dfb in egdb

0 Kudos
SteveLynch
Esri Regular Contributor

shapefile, which uses .dbf, converts null to zero.

To test, create a field in a fgdb that has nulls. Use CopyFeatures and save it to shapefile and you'll notice the zeros.

DanPatterson_Retired
MVP Emeritus

Lynn, it sounds like relying on null values should be avoid in that case.  If the data you are using are counts, put in a count value that isn't possible... you could go 'old school' and use -999 or some equivalent scaled variant.  Any 

observation which is a count cannot possibly have a negative number

0 Kudos
LynnBerni
Frequent Contributor

Thanks Dan, that's an excellent point! 

0 Kudos