max

max function returns the highest value of an attribute among a group of items.

For example, if a template is scoped to products with different prices, use this function to return the highest price. If you’re not searching for the maximum value, you can use any(value) instead.

Note: This function is only available in Templates and can’t be used in Reporting.

Syntax

max(value)

Parameter

  • value: Any type of attribute or column (number, text, or boolean). The function returns the highest value of this attribute for one of the selected items.

Example

  • The following function in an ad template returns the highest sale price of all items in an ad group:
    "Never pay more than " & [to_text(max(ITEM_PRICE))]

Related links

Was this helpful?

How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

true
Search
Clear search
Close search
Main menu
13654236933453781935
true
Search Help Center
true
true
true
true
true
5055977
false
false