AVERAGEX and MAXX
Part of the DAX with CALCULATE section of Coddy's Power BI journey. Lesson 13 of 24.
AVERAGEX, MINX and MAXX work out an expression per row, then average it or keep the smallest or largest.
Biggest Line = MAXX(Sales, Sales[Quantity] * Sales[UnitPrice])MAX times MAX can mix two different lines; MAXX looks at each line whole.
Challenge
EasyWhat is the most valuable order line each shop has rung up? Write Biggest Line: the largest quantity times unit price of any line. It is checked for each store.
Try it yourself
Biggest Line =| Store | Biggest Line |
|---|---|
| Lisbon Riverside | |
| Porto Ribeira | |
| Madrid Centro | |
| Barcelona Gracia | |
| Berlin Mitte | |
| Total |
- Sales
- Revenue
- Total Units
- Customers
- Products
- Stores
- StoreID
- Store
- City
- Country
- OpenDate
- Customers
- Dates
- Targets
All lessons in DAX with CALCULATE
3Row by Row in a Measure
SUMX Works Row by RowAVERAGEX and MAXXFILTER Picks RowsMeasures Inside IteratorsRanking with RANKXRecap - Profit Without Columns