The pivot table presents dimensions and measures as rows and columns in a table. In a pivot table you can analyze data by multiple measures and in multiple dimensions at the same time.
You can rearrange measures and dimensions by pivoting rows and columns.
When to use it
The pivot table is useful when you want to include several dimensions or measures in a single table, and then want to reorganize them to see different subtotals.
The pivot table is very powerful when you want to analyze multiple dimensions and measures at once, and then reorganize them to get a different perspective on your data. You can expand the rows you are interested in while keeping the rows in the rest of the table collapsed.
The pivot table may seem a bit complicated, and does not give insights at a glance.
You can create a new pivot table on the sheet you are editing.
Do the following:
- From the assets panel, drag an empty pivot table to the sheet.
- Click Add dimension and select a dimension or a field.
- Click Add measure and select a measure or create a measure from a field.
You can adjust appearance and other settings in the properties panel.
Pivoting your data in the table
When you want to rearrange your data, drag the items to a new column or row.
In the following pivot table, the dimension Customer has been dragged to the position after Product Group. The dimension Item Desc has been moved to the position before Product Group. As a consequence, the dimensions are now sorted by Item, primarily. Focus has shifted from Customer to Item Desc. You can find out the quantities and sales for each customer by clicking . This will expand a dimension.
By moving the dimension Customer from rows to columns, you retain focus on the dimension Item Desc, but you also get the distribution of items per customer. The move has made the pivot table more information dense.
As you may have noticed, Quantity and Sales are not presented as separate measures in the top column row. Next to the dimension Customer, you find an item called Values. When you use more than one measure, they are automatically grouped together forming a measure group, Values. This group can be added to the rows section or the columns section. The measure group cannot be edited or selected in the table. You cannot split up the measure item and use one measure as a row and another as a column.
You can use the properties panel to sort by the first measure in the group, see Sort by first measure.
Pivoting your data in the properties panel
In the properties panel, you can add measures and dimensions to the pivot table, and also pivot rows or columns.
In the data pane, you can add dimensions and measures. You can move items between rows and columns. You can also change item order inside rows or columns. When you use more than one measure, they are grouped and a Values item is created.
On the sorting pane, you can change the internal order of dimensions and measures.
If you have more than one measure, a measure group is created. Sort by first measure will sort dimension values by the numeric value of the first measure. This sort order will affect all dimensions, and take precedence before any other sort order defined under the dimensions.
For example, you have two measures: Quantity and Sales. In the properties pane, under Data> Measures, Quantity is listed first. If you Sort by first measure in descending order, your table is sorted starting with the dimension with the highest Quantity.
- This option is only supported if subtotals are calculated. You can calculate subtotals by doing one of the following:
- In the properties pane, go to Data, and click on a dimension. Toggle on Show totals.
- In the properties pane, go to Appearance > Presentation. Toggle on Indent rows.
- This option is not supported for calculated dimensions.
- This option is only supported if all dimensions are in the Row section and all measures are in the Column section.
Global grouping lets you create a limited data set, and within that data set, single out values that you want to focus on. For example: the best quarters, the top sales people, or the worst selling products.
In the following pivot table, no limitation is applied. The values are sorted on Sales, descending. The list is long and the values for 2013 are not shown.
In the following pivot table, a limitation has been applied to the (inner) dimension Sales Rep Name, so that only the top five sales representatives for the years 2013 and 2014 are shown.
The next step is to select global grouping in the properties panel. The option Global grouping is only available after you have applied a limitation on the dimension.
When global grouping is selected, the limitation on the top five sales representatives is applied again, but this time the dimension Year is ignored. The five sales representatives with the highest sales (either in 2013 or 2014) are the only ones that will be presented in the final pivot table.
The following image shows the six highest results for 2014 and 2013. The top four results are from 2014, but the fifth (John Greg) is from 2013. Because five other sales representatives have higher sales than Brenda Gibson (who was number five in 2014), she is removed.
The following image shows the pivot table with global grouping applied. The pivot table only contains the sales results for the top five sales representatives. Even though Brenda Gibson had a better result in 2014 than John Greg, his result for 2013 qualified him for the top five list.
By default, if you create a bookmark that contains a pivot table, the pivot table will be shown collapsed. If you expanded any rows using , they will not be shown. However, you can choose to show the pivot table as expanded.
Do the following:
Click in the toolbar.
Click Create new bookmark.
Change the name and description, if desired.
- Toggle on Save layout.
- Click Save.