Unpivoting tables
Use case
You need to UNPIVOT table data in Table Transformer.
Solution
- Switch the page to the edit mode.
- Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
- Select the macro and click Edit.
- In the Presets tab select Custom transformation and click Next.
Enter the following SQL query:
CODE- Click Next.
- Save the macro and the page.
The UNPIVOT function is applied to the selection above and works with the table generated from it. In the function itself new custom columns - Value and Month - are created (column names can be adjusted). The Value column is filled with the data from the columns listed after in ('01-2021', '02-2021', '03-2021'). The Month column displays the relevant column names listed.