Pivot
Convert rows to columns
Pivoting is like flipping your data to see it from a different perspective, making it easier to find patterns or trends. Imagine turning a list of daily sales into a “chart” where each date has its own row and each product becomes a column—it’s the same data but arranged differently. It’s all about reorganizing information so you can focus on the part that matters most for your analysis.
The Pivot tool to an extent does the reverse of the Transpose tool
Configuration
The Pivot tool consists of four required input.
Select Column(s) to Hold Constant
Select the column(s) to hold constant. You can imagine that the columns you select here will remain on rows.
Select Header Column
Select the column you want to transform into columns. You can only select a single column.
Select Value Column
Select the column you want to fill into the values of the column selection you made in Step #2. You can only select a single column.
Select Aggregation
Select how you want to aggregation your value column selection from Step #3.
You can choose from the following types of aggregations:
- Sum: summarize numeric values
- Concatenate: get all your string values in a comma-separated cell
- Mean: find the average of numeric values
- Count: count the occurances
- Count Distinct: count the unique occurances
- Std. Deviation: find the standard deviation
- First: get the first value in the group
- Last: get the last value in the group
- Min: find the smallest numeric value
- Max: find the largest numeric value
When To Use
Generally speaking, the Pivot is useful for transforming the shape of your dataset. Whenever you have a type, metric or category column that consist of different dimensions, you can “flip” that column to be headers instead of rows.
Examples
Example from illustration ☝️
Example from illustration ☝️
I want to change my amount category to columns and summarize the value per category