Now, you need to enter the expressions for all three output ports, using the functions MAX, MIN, and AVG to perform aggregate calculations.
Click the
Open
button in the Expression column of the OUT_MAX_PRICE port to open the
Expression Editor
.
Delete the text OUT_MAX_PRICE.
The following image shows the
Expression Editor
window:
The Formula section of the
Expression Editor
displays the expression as you develop it. Use other sections of this dialog box to select the input ports to provide values for an expression, enter literals and operators, and select functions to use in the expression.
Double-click the Aggregate heading in the
Functions
tab of the dialog box.
A list of all aggregate functions now appears.
Double-click the Max function on the list.
The MAX function appears in the window where you enter the expression. To perform the calculation, you need to add a reference to an input port that provides data for the expression.
Move the cursor between the parentheses next to MAX.
Click the
Ports
tab.
This section of the
Expression Editor
displays all the ports from all transformations appearing in the mapping.
Double-click the PRICE port appearing beneath AGG_PriceCalculations.
A reference to this port appears within the expression. The final step is to validate the expression.
The following image shows the
Ports
tab in the
Expression Editor
:
Click
Validate
.
The Designer displays a message indicating that the expression parsed successfully.
Click
OK
to close the message box from the parser, and then click