transformations:pivot
This is an old revision of the document!
Pivot
Creates a matrix table using values in one column as column labels, and values in another column as the matrix column's values. This transformation is opposite to Unpivot.
EXAMPLE
Table: Winter Olympics medals
Country | Season | Medals |
---|---|---|
Canada | winter 2010 | 26 |
United States | winter 2010 | 37 |
Norway | winter 2010 | 23 |
Germany | winter 2010 | 30 |
Canada | winter 2014 | 25 |
United States | winter 2014 | 28 |
Norway | winter 2014 | 26 |
Germany | winter 2014 | 19 |
Transformation: Pivot on columns [Season] and [Medals]. Aggregation - Any.
Result:
Country | winter 2010 | winter 2014 |
---|---|---|
Canada | 26 | 25 |
United States | 37 | 28 |
Norway | 23 | 26 |
Germany | 30 | 19 |
See also
transformations/pivot.1466380899.txt.gz · Last modified: 2016/06/19 20:01 by dmitry