In my shapefile, I have calculated some indicators for each polygon. Now I want to create a new field having sum of these indicators.
I created new field and populated it with desired values using expression in QGIS. But, the resulting column have some blank rows despite not all of the indicators being NULL
. it is observed only for those rows, where any of the indicator is NULL
. I have used this expression
and here are all the values:
How to solve this?
"crabs" + "schrimps"
instead ofcrabs + schrimps
nullif()
does the oposite: ifvalue1
equalsvalue2
, then the function returnsNull
, else it returnsvalue1
. In this case, ifcrabs==0
then the function returnsNull
, else it return the value ofcrab
... which remainsnull