# max

Source: https://zotonic.com/docs/1549/max

URI: https://zotonic.com/id/1549

Language: en



Take the maximum of the filter value and its first argument.

Usage with two values
---------------------

Take the maximum of the filter value and its first argument.

```django
   {% print 102 | to_integer | max:103 %}
```

Prints `103`.

Usage with two values
---------------------

Take the maximum of the filter value and its first argument::

\{\{ 102\|max:103 \}\}

Prints `103`.

Usage with lists
----------------

Find the maximum value in a list::

```django
   {% print [1, 5, 3, 9, 2] | max %}
```

Prints `9`.

Edge cases
----------

- `undefined | max` returns `undefined`
- `undefined | max:1000` returns `undefined`
- `[] | max` (empty list) returns `undefined`
- Works with translation tuple values.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1549?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1549?language=en>)
