I am actually trying to create a new field in a table with the Model Builder (Field calculator function).
Is there a command that creates a new field, so I can do calculations directly in that new field?
I know that there is a function, which creates a new field when using the field calculator directly but I need a command for it.
In Detail: I want to calculate the percent of an area with this command ($area / sum(area))*100
by using the Modeler, but I want it to be written in an existing layer, creating a new field for it.
1 Answer 1
I found out what I did wrong. I forgot to set up the Output (Green mark) and only set up the input because I thought the Model Builder will create a second layer, what I didn't want it to, because it shall be written in the same layer (Red mark), if I would do it the way in the picture. I deleted the Red mark now and directly putted it from "Add geometry" to the "Field calculator" and set up the one output layer.
Explore related questions
See similar questions with these tags.
Update existing field
to avoid that). Insert your expression, give a name to the new field and run the field calculator - you're done. So your question does not make sense to me: can you add more details about what the problem is?area
for your expression to work, by the way.