Field Calculator

The field calculator allows you to update fields with expressions.

Supported Operations

Operation Description
column_name
"column_name"
value of field column_name
'string'literal string value
numbernumber
NULLnull value
sqrt(a)square root
sin(a)sinus of a
cos(a)cosinus of b
tan(a)tangens of a
asin(a)arcussinus of a
acos(a)arcuscosinus of a
atan(a)arcustangens of a
to int(a)convert string a to integer
to real(a)convert string a to real
to string(a)convert number a to string
lower(a)convert string a to lower case
upper(a)convert string a to upper case
length(a)length of string a
atan2(y,x)arcustangens of y/x using the signs of the two arguments to determine the quadrant of the result.
replace(a,replacethis,withthat)replace replacethis with withthat in string a
substr(a,from,len)len characters of string a starting from from (first character index is 1)
a || bconcatenate strings a and b
$rownumnumber current row
$areaarea of polygon
$perimeterperimeter of polygon
$lengtharea of line
$idfeature id
$xx coordinate of point
$yy coordinate of point
a ^ ba raised to the power of b
a * ba multiplied by b
a / ba divided by b
a + ba plus b
a - ba minus b
+apositive sign
-anegative value of a