Find the best month with MAXX

Iterate the months, evaluate sales for each one, and keep the highest — a peak-month figure for any slice of the business.

You will learn to

  • Find the largest or smallest result with MAXX and MINX
  • Iterate a list of column values with VALUES
  • Combine an iterator with context transition

How it works

`MAXX(table, expression)` evaluates the expression for each row and returns the largest result; `MINX` returns the smallest. Iterate `Sales` and you find the biggest single order line.

To find the best **month**, you need one row per month. `VALUES('Date'[Month Year])` returns the distinct months visible in the current cell, such as “Jan 2024” and “Feb 2024”.

Inside the iterator, `[Total Sales]` is a measure, so context transition filters it to the current month. MAXX then keeps the highest monthly total.

Practice it hands-on with a real data model and a live report that updates as you type.

Smallest Order Line = MINX(Sales, Sales[Amount])