Menu
CoddyTech

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 icon

Challenge

Medium

How 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 =
StoreAverage per Customer
Lisbon Riverside
Porto Ribeira
Madrid Centro
Barcelona Gracia
Berlin Mitte
Total
Fields
  • Sales
    • Revenue
    • Total Units
    • Customers
  • Products
  • Stores
    • StoreID
    • Store
    • City
    • Country
    • OpenDate
  • Customers
  • Dates
  • Targets

All lessons in DAX with CALCULATE