Create Aggregate Variables in Mapper

This article is currently being updated. Please come back later for updates.

The variable mapping aggregate function allows calculation of aggregate values from the underlying data, which can be used for reporting purposes.

Important: Aggregate and Rank transformations respect user privileges and configured Data Blinding rules. If the user or execution account has the Blinded Data View privilege, unblinded values may be used in calculations and included in aggregated results. Verify that access privileges align with the study’s blinding strategy before creating or executing aggregate transformations on sensitive data.

Example: Create a field that displays the first lab result for a given subject to help assess changes.

  1. Select the domain in the Domain Editor window, then click the Variable drop-down and select Aggregate/Rank. 
    • An aggregate box is added to the selected domain, and a warning displays in the Preview area (lower section of the window) to specify settings.
    • The Aggregate options also display in the Domain Properties subpanel.
      Mapper - Aggregate
       
  2. In the Domain Properties subpanel, click the ellipsis in the Aggregate field. The Edit Aggregate window opens.
    Mapper - Aggregate Properties
     
  3. In the Name field, enter a name for the aggregate variable. For example, Base_Result.
  4. In the Function field, click the drop-down and select a function.
    • Example: First Row
    • Available functions include:
      • Count
      • Sum
      • Minimum
      • Maximum
      • Average
      • Standard Deviation
      • Variance
      • Row Number (can be used to create a sequence)
      • Rank
      • Dense Rank
      • Previous Row
      • Next Row
      • First Row
      • Last Row
      • Cumulative Distribution

        Note: Ranking functions such as Rank, Dense Rank, Previous Row, and Next Row rely on the Order By field to determine result order.

  5. In the Field field, click the drop-down and select the field to which the function is applied.
    • Example: LBORRES.

Note: Not all aggregate functions require a field selection. For example, the Row Number function does not require a field.

  1. In the Group/Partition By field, select one or more fields to group by. 
    • Example: USUBJID and LBTESTCD.
    • This captures the first row for each subject and lab test.  Without a Group/Partition By selection, the results include all records.
  2. In the Order By field, select a field to determine the order of the function.
    • Example: USUBJID.
    • This defines the logical order in which the operation is performed.

      Note: Not all functions require an Order By field.
       

      Mapper - Aggregate Example
       

  3. Click Save. The system returns to the Domain Editor window, and the results of the aggregate function display in the Preview area.
    Mapper - Aggregate Results
     

Note: When aggregating blinded data, calculated results reflect the displayed values based on the current user’s privileges and Data Blinding configuration. Review aggregate outputs carefully to ensure sensitive values remain protected as expected.

Aggregate data can be used to create separate summary tables or joined back to the original data for comparison.

Example: In the previous example, the aggregate details represent the base results for each lab test for each subject. These can be joined back to the lab results based on USUBJID and LBTEST. The resulting lab table contains a baseline record for each lab test, allowing direct comparison of results. 

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request