# MaxIf

The **MaxIf** function finds the maximum value for a column or group if the conditions are true.

### Syntax

`MaxIf(field, condition)`

Function arguments:

* **field** (required) - The column to be searched. Can be of type Number, Date, and String.
* **condition** (required) - The condition to test. If the condition is True, then the row will be factored into the aggregate.  You can use [operators](https://support.meetuma.ai/uma-knowledgebase/data-and-reporting/analytics-pro/functions/operators "mention") in conditions.&#x20;

### Examples

```
MaxIf([Invoice Date], [State] = "TX")
```

* Finds the greatest Invoice Date for all entries where the State indicated is Texas.

```
MaxIf([Sales], [Region] = "East" AND [Status] = "Complete")
```

* Finds the maximum Sale value for entries in the "East" Region that are marked as "Complete".
