MAX - Find maximum value of number or date or string port in Informatica

MAX function is available only in Aggregator Transformation

Syntax
MAX( date or numeric or string, [filter_condition] )


Example: The following expression returns the maximum order date for flashlights: [Max(date)]
MAX( ORDERDATE, ITEM_NAME='Flashlight' )

ITEM_NAMEORDER_DATE
FlashlightApr 20 1998
Regulator SystemDec 15 1998
FlashlightSep 21 1998
Diving HoodAug 18 1998
Halogen FlashlightFeb 1 1998
FlashlightOct 10 1998

Output : Oct 10 1998

Example : Maximum number of quantity sold [Max(numeric)]
MAX(quantity_sold)

ITEM_NAMEQUANTITY_SOLD
Flashlight10
Regulator System20
Diving Hood5
Halogen Flashlight27

Output : 27

Example : Maximum of String
MAX(ITEM_NAME)

ITEM_NAME
Flashlight
Regulator System
Diving Hood
Halogen Flashlight

Output : Regulator System

For strings, MAX function is case-sensitive and sorts the string in descending order and returns first value.