
236 Practical PowerPivot & DAX Formulas for Excel 2010
Analysis
MAX() can handle numbers or dates. For other data types, use MAXA(). The result
shows the largest freight charge for any order.
MAXX()
The X-function version of MAX(), MAXX(), returns the maximum numeric or date
value in a table column. The column itself can be the result of an expression, as shown
in this example. There is no MAXAX() function.
This example is a calculated column in the Orders table.
Syntax
=MAXX(RELATEDTABLE('Order Details'),
'Order Details'[Quantity] * 'Order Details'[UnitPrice])
Result
Analysis
This example uses an expression for the second, column, parameter of MAXX(). You
could also reference either a regular or a calculated column—here you might try the
Sales Amount calculated column. The result shows the maximum sales amount from
the order lines for each order.
MAXA()
MAXA() can cope with values that are neither numeric nor dates.
These examples are calculated columns in the Products table.