Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
transformations:unpivot [2021/04/24 17:20] – craigt | transformations:unpivot [2021/07/18 23:48] – craigt |
---|
\\ | \\ |
=====Use cases===== | =====Use cases===== |
This action is used to convert a cross-tabular table into a normalized data table suited for database usage. | This action is used to convert a cross-table (or matrix) into a straight table. It can be used, for instance, to convert a cross-table from an Excel spreadsheet into a table suitable for exporting into a database. |
| |
\\ | \\ |
> Unpivot all columns except these = "Country" selected | > Unpivot all columns except these = "Country" selected |
\\ | \\ |
**Result:** | **Result table:** |
^Country ^Labels ^Data ^ | ^Country ^Labels ^Data ^ |
| Canada |winter 2010 | 26| | | Canada |winter 2010 | 26| |
If no columns were selected under "Unpivot all columns except these", the resultant table would appear as below:\\ | If no columns were selected under "Unpivot all columns except these", the resultant table would appear as below:\\ |
| |
**Result:** | **Result table:** |
^Labels ^Data ^ | ^Labels ^Data ^ |
|Country | Canada | | |Country | Canada | |
|winter 2014 | 19| | |winter 2014 | 19| |
| |
| \\ |
| ====Community examples==== |
| * [[https://community.easymorph.com/t//1279/4|Example: Constructing JSON]] ([[https://community.easymorph.com/uploads/short-url/m063pNiVTAgev8a7h7z93mlXbAU.morph|Project]]; Module: //Table2json//; Group: //Tab 1//; Table: //Create JSON elements//; Action position: //4//) |
| * [[https://community.easymorph.com/t//1482/6|Pivot tables basis data]] ([[https://community.easymorph.com/uploads/short-url/dkfcbulAExEaMObhjxprjxXdqtE.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 1//; Action position: //3//) |
| * [[https://community.easymorph.com/t//1778/2|Aggregate for +500 columns]] ([[https://community.easymorph.com/uploads/short-url/8w0FN8IXxRdEIORedS9u8DKqhfA.morph|Project]]; Module: //Main//; Group: //Order preserved//; Table: //Book1.xlsx(2)//; Action position: //2//) |
| * [[https://community.easymorph.com/t//2017/3|Duplicating rows based on a condition]] ([[https://community.easymorph.com/uploads/short-url/blETeOO6qUVzskyO2eYqMiNvjPP.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 1 (2)//; Action position: //2//) |
| * [[https://community.easymorph.com/t//2421/8|“Merge another table” action - merge all columns (independently of the column name)]] ([[https://community.easymorph.com/uploads/short-url/jHsMLkfW9YZVmGYNYtayhOt1VkJ.morph|Project]]; Module: //Merge//; Group: //Merge//;\\ Table: //Type + Range//; Action position: //2//) |
| |
\\ | \\ |