Price, volume and mix analysis in Power BI with DAX

How price-volume-mix (PVM) analysis splits a revenue change into price, volume, mix and new or lost product effects, the formulas with a worked two-product example that adds up exactly, the DAX measures, and a waterfall chart from last year's revenue to this year's.

Short answer: price-volume-mix (PVM) splits the change in revenue between two periods into parts that add up exactly: volume (more or fewer units in total, at last year's average price), mix (a shift toward dearer or cheaper products), price (each product's price change on this year's units), and new and lost products. For products sold in both periods: volume = (Q1 - Q0) × average price last year; mix = Σ Q1 × P0 per product - Q1 × average price last year; price = Σ (P1 - P0) × Q1. A waterfall from last year's revenue through the effects to this year's shows it in one picture.

"Revenue is up 40%" invites the question "because we sold more, or charged more?". PVM answers it.

How does a worked example add up?

ProductQ0P0Revenue 0Q1P1Revenue 1
A100101,0009011990
B50402,00080403,200
Total15020 (average)3,0001704,190
Two products, last year (0) and this year (1)
  • Volume = (170 - 150) × 20 = +400: 20 more units at last year's average price.
  • Mix = (90 × 10 + 80 × 40) - 170 × 20 = 4,100 - 3,400 = +700: sales moved toward B, the dearer product.
  • Price = (11 - 10) × 90 + (40 - 40) × 80 = +90: A got dearer.
  • Total = 400 + 700 + 90 = +1,190 = 4,190 - 3,000.
01,0002,0003,0004,0005,0003,000Last year+400Volume+700Mix+90Price4,190This year
Revenue last year to this year

Most of the growth is mix: customers bought more of the expensive product. Price was a small part.

What is the DAX?

Measures by product: [Revenue], [Qty], and their last-year versions with SAMEPERIODLASTYEAR. Products sold in both periods are the "continuing" set:

Qty = SUM ( Sales[Quantity] )
Qty LY = CALCULATE ( [Qty], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Revenue LY = CALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )

Volume Effect =
VAR Cont = FILTER ( VALUES ( 'Product'[Product] ), [Qty] > 0 && [Qty LY] > 0 )
VAR Q1 = SUMX ( Cont, [Qty] )
VAR Q0 = SUMX ( Cont, [Qty LY] )
VAR AvgP0 = DIVIDE ( SUMX ( Cont, [Revenue LY] ), Q0 )
RETURN ( Q1 - Q0 ) * AvgP0

Mix Effect =
VAR Cont = FILTER ( VALUES ( 'Product'[Product] ), [Qty] > 0 && [Qty LY] > 0 )
VAR Q1 = SUMX ( Cont, [Qty] )
VAR AvgP0 = DIVIDE ( SUMX ( Cont, [Revenue LY] ), SUMX ( Cont, [Qty LY] ) )
RETURN SUMX ( Cont, [Qty] * DIVIDE ( [Revenue LY], [Qty LY] ) ) - Q1 * AvgP0

Price Effect =
VAR Cont = FILTER ( VALUES ( 'Product'[Product] ), [Qty] > 0 && [Qty LY] > 0 )
RETURN SUMX ( Cont, [Revenue] - [Qty] * DIVIDE ( [Revenue LY], [Qty LY] ) )

New Products Effect =
SUMX ( FILTER ( VALUES ( 'Product'[Product] ), [Qty] > 0 && NOT ( [Qty LY] > 0 ) ), [Revenue] )

Lost Products Effect =
- SUMX ( FILTER ( VALUES ( 'Product'[Product] ), [Qty LY] > 0 && NOT ( [Qty] > 0 ) ), [Revenue LY] )

Volume + Mix + Price + New + Lost = Revenue - Revenue LY, always. For the waterfall, put the five effects in a small disconnected table (Step, Order) and a SWITCH measure that returns the effect for each step.

Which level should the mix be measured at?

Mix depends on the grain: by product, by product category, by customer segment or by country. Measured by category, a shift between two products of the same category counts as price, not mix. Pick the level at which pricing decisions are made, and keep it fixed.

What goes wrong?

  • Effects that do not add up. Usually new or lost products left out; give them their own bars.
  • Units of different kinds. Mixing kilograms and pieces makes volume meaningless; analyse each unit type separately.
  • Discounts. Use net price after discounts, or discounts appear as mix.
  • Currency. Exchange-rate changes show up as price; add an FX effect for multi-currency sales.

Where can you check this?

Where do you start?

Run the three effects on your top product category for this year against last. Profit margin shows whether the mix shift also helped profit.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.