Measures Inside Iterators
Part of the DAX with CALCULATE section of Coddy's Power BI journey. Lesson 15 of 24.
VALUES(Table[Column]) is a table of the different values in the bar.
Inside an iterator, a measure is calculated for the current row: context transition.
Average per Customer = AVERAGEX(VALUES(Sales[CustomerID]), [Revenue])A bare SUM ignores the row; the measure does not.
Challenge
MediumHow much does a customer spend at each shop? Write Average per Customer: the average of Revenue over the different customers. It is checked for each store.
Try it yourself
Average per Customer =| Store | Average per Customer |
|---|---|
| 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