Skip to content

Commit d509ce7

Browse files
fix(pvm): tie bridge to total by pricing variance at actual quantity
Symptom: the budget-to-actual bridge left a 480.00 residual, so the three effects did not sum to the total revenue variance. Root cause: price variance was measured at budget quantity, which strands the price-times-volume interaction unassigned. Measuring price at actual quantity folds that interaction into the price effect, and the bridge ties to zero.
1 parent 700b5c9 commit d509ce7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎models/intermediate/int_pvm_components.sql‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ select
1717
actual_price,
1818
budget_revenue,
1919
actual_revenue,
20-
-- price effect measured at budget quantity
21-
cast((actual_price - budget_price) * budget_units as decimal(18,2)) as price_effect,
20+
-- price effect measured at actual quantity, so the price-volume
21+
-- interaction is captured here and the bridge ties out
22+
cast((actual_price - budget_price) * actual_units as decimal(18,2)) as price_effect,
2223
-- quantity effect at budget price
2324
cast(budget_price * (actual_units - budget_units) as decimal(18,2)) as quantity_effect
2425
from s

0 commit comments

Comments
 (0)