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 expression or 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
|
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")}
|
Business rules: Set Value
Attribute expression |
max(Approval_Date__c, Milestone_1_Date__c)
|
Metric expression | max(OPEX__m.Actual, CAPEX__m, Other_Expense__m)
|