Use Case

You need to count the definite value in columns.

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 "Red mark" AS '',
    SUM(IF(T1.'Time' = "RED", 1, 0)) AS 'Time',
    SUM(IF(T1.'Quality' = "RED", 1, 0)) AS 'Quality',
    SUM(IF(T1.'Customer Satisfaction' = "RED", 1, 0)) AS 'Customer Satisfaction'
    FROM T1
    SQL
  6. Click Next

  7. Save the macro and the page.