MAX

MAX(list)

Gives the largest value in a list, such as the latest finish among a task's predecessors, or the larger of two values. When there are no values it is blank, not 0, so a task with no predecessors gets an empty cell rather than a misleading zero.

Arguments

ArgumentWhat to give it
listA column read from a set of rows, like Predecessors[Finish date], or several single values: MAX(0d, [Total float]). Numbers, durations, dates or text. Blanks are skipped. It also takes one level or date over time (see below).

Examples

Formula
=MAX(Predecessors[Finish date])

The latest finish among the task's predecessors: the earliest it could start after all of them.

Formula
=MAX(0d, [Total float])

The task's total float, with negative float shown as 0d.

Measure (on the project)
=MAX(Tasks[Finish date])

As a measure: the last finish in the schedule.

Formula on relationships
=MAX([Lag], 0d)

On a relationship: its lag, with a lead counted as no lag.

Formula
=MAX(HISTORY([Finish date]))

The latest the task's finish has been forecast at any update. MAX of one date or level over time gives its highest point.

Reach for something else when

You wantUse
The smallest valueMIN
The task that has the largest value, not the valueARGMAX
A floor or a ceiling on one valueCLAMP
Where a value stands in the listRANK

Common questions

Why is MAX blank on some rows?

There were no values: the set was empty, or the column was blank on every row of it. To show a value instead, wrap it in COALESCE.

Do blanks count as 0?

No, they are skipped, with several single values too: MAX(0d, [Total float]) is 0d on a complete task, whose total float is blank, not blank itself.

Can I mix 0 with durations?

Yes. A bare number among durations is working days, so MAX(0, [Total float]) reads as MAX(0d, [Total float]). Dates and durations don't mix: "MAX gives Date in one place and Duration in another".

What does "MAX takes one list, or several single values" mean?

A list and a single value were mixed in one MAX.

The editor refuses this
=MAX(Predecessors[Finish date], [Start date])

Take the list's MAX first, then compare: MAX(MAX(Predecessors[Finish date]), [Start date]).

How do I find a resource's peak?

Add its assignments up as a level over time, then take the MAX of that: the most they add up to at any moment. An amount, such as hours spread over a task, is refused with "An amount over time has no peak: add it up with TOTAL(…), or divide it by another amount for a rate (a level over time) and take its MAX". See amounts and levels.