I have a points layer with a "Name"
column.
The "Name"
values are strings and similar to
'X501', 'X501.1', and 'X501.2'.
I need to change any values like 'X501'
to 'X501.0'
and leave others as they are.
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI have a points layer with a "Name"
column.
The "Name"
values are strings and similar to
'X501', 'X501.1', and 'X501.2'.
I need to change any values like 'X501'
to 'X501.0'
and leave others as they are.
Try one of these expressions:
if("Name"='X501','X501.0',"Name")
or
if(regexp_match("Name",'^X501$'),'X501.0',"Name")
References:
Figured it out just now, this works perfectly:
IF ("Line" LIKE '%.%', "Line", concat("Line",'.0'))