Operations: Max and Min

The Max and Min operations select a value based on its magnitude — highest or lowest. They work with numeric fields, dates, and text fields (using lexicographic ordering for text).

Max

Selects the highest value among all records in the group (from selected data sources).

Best used for:

  • Dates — selecting the most recent update date or last activity date
  • Version numbers — keeping the latest version
  • Numeric scores or balances — preserving the highest value
  • Text fields — picks the last alphabetically (e.g., "Zebra" over "Apple")

Min

Selects the lowest value.

Best used for:

  • First-seen dates — preserving the original creation date across systems
  • Original IDs — keeping the oldest/smallest identifier as the canonical one
  • Priority fields — where lower numbers mean higher priority

Example showing records with different last-modified dates where Max operation selects the most recent date

Numeric vs. Text Comparison

For numeric fields, Max and Min compare values as numbers (e.g., 100 > 99). For text fields, they compare lexicographically (alphabetically): "Z" > "A". For date fields, later dates are considered larger. MatchLogic uses the field's detected data type from Data Profiling to determine comparison mode.

Important

If a date field is stored as text (e.g., "2024-01-15"), ensure it's in ISO 8601 format (YYYY-MM-DD) so lexicographic ordering matches chronological ordering. Run Data Profiling first to verify date field formats.

Null Handling

Nulls are treated as smaller than any non-null value. Max ignores nulls and picks from non-null values. Min may return null only if all records in the group have null for that field.