MINDIFF

For each parent, returns a number that represents the minimum difference between each of the child records.

MINDIFF ( <field_name> [, <filter_query>] )
  • field_name: The numeric field to base the calculation on.

  • filter_query: A query string representing the domain of records to include.

Example: create a field on the CUSTOMER table to return the smallest difference in value between each customers' purchases and only look at records where product code is B.

MINDIFF( [PRODUCT.PRODUCT_PURCHASE_DATE] , [PRODUCT.PRODUCT_CODE] = "B")