Using Advanced Expression Piping within your forms you can create mathematical formulas in order to calculate a value. Using the MAX function you can return the largest value out of a list of values given by your applicants.

**In this Article...**

The MAX function accepts a list of floating or integer values and returns the largest one. This can either be used for a single row or column within a grid question, the table as a whole or a list of variables within the form.

The setup and formatting of the MAX expression is imperative in preventing an ** error** message from appearing on your form where the result of your expression would normally appear. The first line of the max expression should be set up as follows:

{{ MAX(variable1,variable2) }} |

- Each expression is always contained within a pair of double "curly" brackets {{ }}
- There should be a space between the first instance of MAX and the last bracket
- Variables you are using are case sensitive
- Always close each MAX operation with brackets ( )
- Can contain a (,) to separate values. Cannot contain any operators such (+),(-),(*), etc.

MAX of Select Cells |
{{ MAX(q1[0],q1[2],[q1[3]) }} |
Based on Grid Indexing, this will give you the highest value of the 1st, 3rd, and 4th cells. |

MAX of a Column |
{{ MAX(q1[:0]) }} |
Based on Grid Indexing, this will find the largest value in column 1. |

MAX of a Row |
{{ MAX(q2[1:]) }} |
Based on Grid Indexing, this will find the largest value in Row 2. |

MAX of a Range |
{{ MAX(q1[0:4]) }} |
Based on Grid Indexing, this will give you the largest value of the first 4 cells. |

MAX of Reviewer Scores |
{{ MAX(q1.score,q2.score,q3.score) }} |
The value of the highest score given to one of the listed questions. |

It would not be possible to perform any expressions or to have any other functions within a single MAX expression such as SUM to calculate the different variables together to then find the largest one. The best way to pull the largest value from this information would be to have to have the SUM operations on one page and pipe the totals to the next page using the MAX expression.