Use case

You need to merge tables, create a new column with the sum of two others, and then highlight and align text.

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 T1.'Name', T1.'Income 2019', T2.'Income 2020', FORMATWIKI("{cell:textColor=red|align=right}" , ( T1.'Income 2019' + T2.'Income 2020') , "{cell}") AS 'Total Income' FROM T1 OUTER JOIN T2 ON T1.'Name' = T2.'Name'
    SQL

    Keep the following order of attribues: bgColor, textColor, align, width.

  6. Click Next

  7. Define the table settings and view options if needed. 

  8. Save the macro and the page.