Use Case

You have a table (a macro outputting a table) containing a set of numeric values.

You need to calculate the standard deviation or variance.

Solution

  1. Switch the page to the edit mode.
  2. Insert the Table Transformer macro and paste the table within the macro body.
  3. Select the macro and click Edit.
  4. Switch to the SQL query tab.
  5. Enter the following SQL query (select the functions depending on what you'd like to calculate):

    SELECT
    MEDIAN(T1.'Value') AS 'Median',
    STDDEV(T1.'Value') AS 'Standard deviation population',
    STDEV(T1.'Value') AS 'Standard deviation sample',
    VAR(T1.'Value') AS 'Variance sample',
    VARP(T1.'Value') AS 'Variance population'
    FROM T1
    SQL
  6. Click Next.
  7. Define the table settings and view options if needed.
  8. Save the macro and the page.

You can use FORMATWIKI function for the purposes of cell formatting.