Find your smallest customer with MINX
Spot the weakest account in each region by iterating customers with MINX and evaluating their sales.
You will learn to
- Find the smallest result per customer with MINX
- Keep the iterator inside the current filter by iterating Customer, not ALL(Customer)
How it works
`MINX(table, expression)` evaluates the expression for every row and returns the smallest result. Iterate `Customer` with a measure and you get the sales of the smallest customer.
The table you iterate respects the current filters. In the West row, `Customer` holds only West’s customers, so MINX finds West’s smallest account. `ALL(Customer)` would bring every customer back and give the same company-wide answer in every row.
Customers with no sales in the current cell return blank, and MINX skips blanks. So in a Bikes filter the result is the smallest customer who actually bought a bike, not a zero.
Practice it hands-on with a real data model and a live report that updates as you type.
Largest Product Sales = MAXX(Product, [Total Sales])