Create a variable based on summary calculation

In this example, you create a table for each compound. Each table shows the retention time of the compound in each sample. A second column shows the difference to the average retention time of the compound in the entire sequence. To accomplish this, you create a composite group which contains one hidden table and one visible table. The hidden table is used to store the average values in a variable.

  1. Make sure that variables are activated in your report template (see Activate the use of variables).

  2. Add the data field Fields > Compound > Name to the template.

  3. Add two Compound Summary tables to the template.

  4. Select all three items and click to create a composite group.

  5. Repeat the composite group on Compound_Name.

  6. If required, filter the composite group for the main signal (Peak_Calibrole=1).

  7. Prepare the first table to store the variable.

    1. Remove the Repeat On setting from the table.

    2. In the Advanced page, clear the Visible check box.

    3. On the Columns page, select the RT column and click Column Properties.

    4. On the Summary Calculations page, select the Average function, and enter VarAvgRT as the Variable Name.

    5. Confirm all settings.

    6. In the Editing Pane, resize the table so that it requires only minimal space.

  8. Prepare the second table to show the difference between retention time and retention time average.

    1. Remove the Repeat On setting from the table.

    2. On the Columns page, add a Custom Field to the table layout.

    3. Move the new column to the right of the RT column and adjust its size.

    4. In the Column Properties of the new column, enter the following expression as a value: =Peak_RetentionTime - VarAvgRT

    5. On the Format page, adjust the number format for the new column to Number, 1234.00, and set Rounding to 4 decimal places.

    6. Confirm all settings and generate a preview.

    7. The generated report will show the difference between the individual retention times and the sequence average.