This examples describes how to sum up only those peak areas that are greater than a certain value. To sum up the areas per compound, a composite group is used that is repeated on Compound_Name.
Add the Compound Results table to the template.
Open the Column Properties dialog of the Area column, and save the value as a variable.
Show details of taskShow details of task |
Under Calculation Variables, select Aggregator.
Under Calculation Variable Name, enter a name. For example, AreaIf.
Under Condition, double-click Expression....
In the Expression Editor, enter the following expression: =Peak_Area > 3
Save your settings.
Underneath the table, add a text field that shows the sum of all areas that meet the condition. Use the following condition: =Sum(AreaIf)
Add another text field that contains the Clear function: =Clear(AreaIf)
Clear the Visibility check box for the text field with the Clear function.
Select the table and both text fields, and create a composite group.
Repeat the composite group on Compound_Name.
For each compound, the generated template will show a table with all injections, and a textbox with the sum of peak areas. The sum is based on all peak areas greater than 3.