Turn a column's distinct values into columns. Set a row dimension (pivotRows), a column dimension (pivotOn), and the measures to aggregate into each cell (pivotValues). v2 adds spanning column headers, subtotals + a grand total (pivotOptions), and multi-field column dimensions.