4

Can someone help me with the area calculation of certain objects in the attribute table?

I want to add up all the objects that follow a specific, same formulation of a specific column in the table. I have a large number of owners who in turn own many areas/objects. Now I want to see how much total area each owner has.

I can calculate every object of a certain column. But how does the formulation in the field calculator have to look like if I want to add up all those from column x that have the same formulation?

2 Answers 2

3

If you've got a vector layer with one attribute for the area ("SUPERFICIE" in my example) and another attribute for grouping the data ("ZONIFICACI" in my example)

enter image description here

You can use the "Statistics by categories" tool in the toolbox, selecting the layer; the field (attribute) for which you want the statistics ("SUPERFICIE" in my example); and the field with the categories (clicking the 3 dots button on the right and checking the corresponding field)

enter image description here

Click execute and you'll get a new layer with the statistics, being the sum (of the area in this example) one of the values

enter image description here

2

sum($area,group_by:="fieldname containing owners") it is.

For more details check the documentation page on sum.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.