DAX code
Weighted Average Price =
DIVIDE(
SUMX('Sales', 'Sales'[UnitPrice] * 'Sales'[Quantity]),
SUM('Sales'[Quantity])
)
Averages the unit price weighted by quantity sold, instead of a simple unweighted average of prices.
Type your table and column names once. Every measure below updates.
Weighted Average Price =
DIVIDE(
SUMX('Sales', 'Sales'[UnitPrice] * 'Sales'[Quantity]),
SUM('Sales'[Quantity])
)
This is mathematically the same as Average Selling Price when price and quantity come from the same rows - use whichever name fits your report.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Weighted Average Price.