# What are pivot tables?

A pivot table is a table element with fixed roles and types for its columns, suitable for processing and aggregating multi-dimensional data.

Grouping, sorting, and summarizing can be performed on a pivot table. The results can be displayed in different ways.

A pivot table has two types of columns: dimensions and measures. A column is either a dimension or a measure. A pivot table has one type of row, a fact row. The values in the cells of a row are either dimension values or measures, depending on the column type.

Data is sorted by the dimension values. A column usually has many rows with identical dimension values. The dimensions can be seen as forming a hierarchy. For this reason, dimension, can also called hierarchies.

A measure is aggregated. If the measure is numeric, the aggregation could be an average of the measure values, the sum of the measure values, the maximum or minimum of the measure values, or another mathematical function.

For example, a table has the dimension columns "Country" and "Region". After sorting the data, several rows starting with  {"Afghanistan","1 North",..} are at the top, followed by rows starting with {"Afghanistan","3 South",..}, followed by rows starting with {"Albania","1 North",..}. "Country" and "Region" form a hierarchy or tree where a country branch has sub branches for its regions. The innermost dimension contains the "facts" or "values" (the measure columns from the fact rows). In a tree representation, the leaves of the tree are records containing the values for the measure columns.