Use case

You need to UNPIVOT table data in Table Transformer.

Solution

  1. Switch the page to the edit mode.
  2. Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
  3. Select the macro and click Edit.
  4. In the Presets tab select Custom transformation and click Next.
  5. Enter the following SQL query:

    SELECT * FROM T1
    UNPIVOT ('Value' for 'Month' in (T1.'01-2021', T1.'02-2021', T1.'03-2021'))
    CODE
  6. Click Next.
  7. 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.