# Greatest

Returns the largest value amongst the inputs.

### Usage

```
Greatest(input1, [input2], ...)
```

**input 1** (required) The data or column of data to be evaluated. Input can be numbers, dates, or strings.

**input 2+** (optional) Additional inputs to compare. All additional inputs must match the type of the first input.

> ### 📘To compare a column of dates against a specific date, wrap the input in the Date() function.

### Example

```
Greatest([Profit 2020], [Profit 2021], [Profit 2022])
```

* Returns the profit from the year with the greatest profit

```
Greatest([Invoice Date], Date("2020-01-01"))
```

* Returns the more recent date.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.meetuma.ai/uma-knowledgebase/data-and-reporting/analytics-pro/functions/math-functions/greatest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
