max()

The max() function returns the largest number or latest date from a set of values. This function can be used in a metric expression to return a time-series array or can be used in any other expression to return a single value.

Syntax

max(value1, value2, [value3]…)

Argument Description
value1

(required)

The first number or date you want to compare.

This argument can be a constant (i.e., hard-coded value or attribute reference) and/or an expression.

value2

(required)

The second number or date you want to compare.
value3…

(optional)

The additional numbers or dates you want to compare.

Where Available

Available in all places the injected expression icon is visible, as well as within Filter fields on Cards, Tables and List/View sections.

Examples

Where Example(s)
Field Editability expression

Tab Visibility expression

Business rules: Condition

if(max(Num1__c,Num2__c)) > 15

if(Status_Color__c="Red", max(Start_Date__c, Approval_Date__c), max(addDays(Start_Date__c,10), Approval_Date__c)) > today()

Dynamic Filter

Notification Body

Notification Subject

{!if(Status_Color__c="Red", max(Milestone_1_Date__c,Milestone_2_Date__c), Milestone_1_Date__c)}
Embedded Section URL attribute

Business rules: Call URL

External View URL on List/View

{!if(max(Num1__c,Num2__c)) > 15, "https://abcnews.go.com/", "https://www.nbcnews.com")}

{!if(max(Num1__c,Num2__c)) > 15,URL1__c, URL2__c)}

Business rules: Set Value

Attribute expression

max(Approval_Date__c, Milestone_1_Date__c)

max(10, Employee_headcount__c)

max(Revenue__m.actual__d.timePeriod("12/31/2023"), 250000)

Metric expression max(OPEX__m.Actual, CAPEX__m, Other_Expense__m)

max(10, Employee_headcount__c)

max(Value_1__c,Value_2__c,days("09/01/2023",Milestone_1_Date__c))

max(Revenue__m.actual__d.timePeriod("12/31/2023"), 250000)

 

Updated on January 29, 2024

Related Articles