In QGIS, Field Calculator, I am trying to fill out an existing field (target) based on values on another existing field (source), both in the same shapefile. For each value x in the source, field set the corresponding value in the target field to y.
I am trying to achieve this with a CASE statement like that: First I tick the updated existing field and set it to target. Then I use this expression
case
when "source" is 'X' then 'Y'
end
the target filed successfully updates to Y for each X occurrence in the source field, but all the other values in the target field are set to null.
How can I prevent that from happening?
ELSE
to put into the field (i.e. for when"source"
is not'X'
). This may simply be what's in"target"
in the first place!