Summarizing Attributes

This tutorial demonstrates two ways to summarize statistics for attribute values within QGIS.

Included in this tutorial:

  • Accessing a statistical summary with the statistics panel

  • Generating statistics through the processing toolbox

Software version in examples: QGIS-LTR 3.40.5-Bratislava

Tutorial Data: The tutorial includes demonstration with sample data available here.

Credits: Sally Kaye and L. Meisterlin (2025)

These tools can be used to quickly access summary statistics for quantitative values such as the sum, mean, median, standard deviation, and others.

 

Option 1: Statistical Summary

You can quickly access statistical summary information for the quantitative fields in any table within your project via the Statistics panel.

Navigate through View (in the main menu)  > Statistical Summary to summon the Statistics Panel. 

Within the Statistics Panel, use the dropdown menus to select the relevant layer (a vector dataset or a standalone table) and field for summarizing.

In the example below, we choose to summarize the values in the “dec_a” field of the  Points1_Table1_join layer.

You can also generate statistics for more complex values (resulting from one or more fields in your table) by clicking the sigma (ε) symbol to open the expression builder and function editor. 

The resulting field statistics will automatically populate in the Statistics Panel for quick viewing.

accessing the Statistics panel


Option 2: Generating Statistics through the Processing Toolbox

To produce a record of summary statistics for later reference, you can use the Basic Statistics for Fields tool. This will generate the same statistics and provide multiple options for output formats.

Accessing and executing the Basic Statistics for Fields tool

In the Processing Toolbox, find Basic Statistics for Fields under Vector Analysis and double-click to open the tool’s dialogue. 

Using the dropdown menu, select the input layer. The input layer is the vector dataset that includes the attributes you wish to summarize. In our example demonstration below, we will choose Points1_Table1_join).

Choose the field to calculate statistics on (in this example, we choose dec_a).

By default, the tool generates a temporary layer (a table) for the statistics summary, which will be added to the current project. You can alternatively choose to create a new table dataset file by clicking the three-dot button to the right of Statistics and specifying a name and location for the new file.

In addition, you can choose to save the statistics report as an HTML file by clicking the three-dot button next to Statistics report and specifying a name and location to save the file. 

Click Run to generate statistics. 

accessing and filling in the Basic Statistics for Fields dialogue box

Examining the Basic Statistics results

Results of the Basic Statistics for Fields tool, a statistics report, can be found in at least two formats. A text version of the report will be included in the processing log after running the tool. This is highlighted below.

viewing a statistics report in the processing log

A table version of the field statistics is also added to the current project. 

In our example (above), we generated a temporary table of results. Opening and reviewing the output Statistics table is demonstrated below.

viewing the table results of a basic statistics report

 
Previous
Previous

Table Joins

Next
Next

Citing Maps & Data