I have a vector layer of habitats. Each feature belongs to a category and has its area calculated. I'm trying to find out the total area of each type of habitat.

I've looked at QGIS "Statistics by categories" which gives everything but the Sum of each category.

The GroupStats plugin looks like it would do it, but I can't get the "calculate" button to activate.

I'm new to QGIS tools/scripts etc but happy to try to modify an existing tool but haven't yet found where they are or how to do this.

2 Answers 2


You are correct, Group Stats plugin is exactly what you need.

See the example below. You need to drag and drop your category field into Rows, and your area field and the function sum into value. In my image, "Freguesia" is my Category, and I used the area function instead of a field.

enter image description here

The beauty of this plugin is that you can do the same with more than one category by using rows and columns.

enter image description here


Another option is Filed Calculator. You can add a new field and sum the area by each habitat. enter image description here

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.