AVG - To find average of all rows in Informatica

AVG is a aggregate function used to calculate average of all rows. It also allows you to add a filter condition, where AVG function calculates average of rows selected by filter condition.

Syntax
AVG( numeric_value [, filter_condition ] )

ArgumentRequiredDescription
numeric_valueRequiredNumeric datatype. Passes the values for which you want to calculate an average. You can enter any valid transformation expression.
filter_conditionOptionalLimits the rows in the search. The filter condition must be a numeric value or evaluate to TRUE,

Note : Only one Aggregation function can be nested inside AVG function.
AVG Function ignores NULL Values while calculating average.

GROUP BY
Informatica groups by ports while calculating average and it is defined by Group By check box in the transformation.
When group by port is not defined, all the rows are grouped and one value is returned.

Example : Without filter condition, Group By Student Name
Student_NameMarks
Rick90
Shane85
Rick80
Shane95
ShaneNULL


Return Value :
Rick 85
Shane 90