Skip to main content

I have a shapefile with multiple float-fields. I want to calculate the minimum value of these fields. For some of the features the calculation is correct, but for some features the values are not used.

I use the AttributeCreator with the Arithmetic Editor: 

@min(@Value(BOVENGRENS),@Value(ONDERGRENS),@Value(WINTERPEIL),@Value(VAST_PEIL))

This gives the following result in the field Rekenpeil:

0684Q00000ArBmiQAF.jpg

Thank you for your replies!

It's because of the NULL values, the value of min(n,NULL) = NULL, not n.


Then why is there a value in the first and fourth row? On those features there are also null values.


Then why is there a value in the first and fourth row? On those features there are also null values.

Strange. The min function should return null always if one or more arguments were null. I was not able to reproduce the same situation as yours. Could you please share a minimal data and workspace which reproduce the situation?

 

 


Then why is there a value in the first and fourth row? On those features there are also null values.

I agree with Takashi, that's indeed unexpected. I wasn't able to reproduce that either.

I can't send the file, but thanks to your replies I have used a NullAttributeMapper to change the Null values to Empty, which has solved my problem. Thank you!


Reply