{"ref":{"kind":"component","id":"corporate_margin_bridge","key":"sha256:7a3508cbc6040d4caa96ea1e4b6b5516d17ed4a7990efacb59609bfe0ff1bb3d"},"label":"Margin and disclosed cost changes","description":"Reconcile a chosen margin to revenue growth, identified cost changes and an explicit remainder.","inputs":[{"label":"Changes","name":"changes","valueType":{"axes":[{"extent":null,"name":"driver","variable":true}],"dtype":"f64","unit":"$"}},{"label":"Current Costs","name":"current.costs","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Current Revenue","name":"current.revenue","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Prior Costs","name":"prior.costs","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Prior Revenue","name":"prior.revenue","valueType":{"axes":[],"dtype":"f64","unit":"$"}}],"outputs":[{"label":"Comparison Available","name":"comparison_available","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Cost Change","name":"cost_change","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Cost Effects","name":"cost_effects","valueType":{"axes":[{"extent":null,"name":"driver","variable":true}],"dtype":"f64","unit":"%"}},{"label":"Cost Residual","name":"cost_residual","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Current Revenue Available","name":"current_revenue_available","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Identified Change","name":"identified_change","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Margin","name":"margin","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Margin Change","name":"margin_change","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Margin Residual","name":"margin_residual","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Negative Inputs","name":"negative_inputs","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Prior Margin","name":"prior_margin","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Prior Profit","name":"prior_profit","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Prior Revenue Available","name":"prior_revenue_available","valueType":{"axes":[],"dtype":"f64","unit":"flag"}},{"label":"Profit","name":"profit","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Profit Change","name":"profit_change","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Revenue Effect","name":"revenue_effect","valueType":{"axes":[],"dtype":"f64","unit":"%"}},{"label":"Unexplained Change","name":"unexplained_change","valueType":{"axes":[],"dtype":"f64","unit":"$"}},{"label":"Unexplained Effect","name":"unexplained_effect","valueType":{"axes":[],"dtype":"f64","unit":"%"}}],"dependencies":[],"libraries":["corporate_margin"],"notes":{"conventions":["Prior and current revenue and costs are nonnegative magnitudes for matching periods, currency, perimeter and accounting presentation.","Changes are signed nonoverlapping cost movements, not cost levels. The caller owns their labels, ordering and completeness.","The unexplained cost change is total change less identified changes; it can be negative and is never clamped or called a disclosed cost category.","The margin bridge changes revenue first while holding prior costs fixed, then applies all cost changes at current revenue.","This ordering assigns the revenue/cost interaction to cost effects. The bridge is arithmetic attribution, not causal economics or incremental margins.","Margin effects are fractional percentage-point changes. Both revenues must be positive; otherwise bridge ratios are zero with an unavailable flag.","A zero identity residual does not establish full cost disclosure. Costs may already contain depreciation, funding or netted revenue costs; do not deduct them again.","The caller names the resulting profit measure. No merchandise margin, purchases, cash flow or forecast is inferred."]},"calculation":{"nodes":[{"id":"input-changes","label":"Changes","kind":"input"},{"id":"input-current.costs","label":"Current Costs","kind":"input"},{"id":"input-current.revenue","label":"Current Revenue","kind":"input"},{"id":"input-prior.costs","label":"Prior Costs","kind":"input"},{"id":"input-prior.revenue","label":"Prior Revenue","kind":"input"},{"id":"step-identified_change","label":"Identified Change","kind":"step","rule":"Sum(Changes)","sources":[{"node":"input-changes"}]},{"id":"step-profit","label":"Profit","kind":"step","rule":"(Current Revenue − Current Costs)","sources":[{"node":"input-current.revenue"},{"node":"input-current.costs"}]},{"id":"step-value2","label":"(Current Revenue > 0)","kind":"step","rule":"(Current Revenue > 0)","sources":[{"node":"input-current.revenue"}]},{"id":"step-cost_change","label":"Cost Change","kind":"step","rule":"(Current Costs − Prior Costs)","sources":[{"node":"input-current.costs"},{"node":"input-prior.costs"}]},{"id":"step-prior_profit","label":"Prior Profit","kind":"step","rule":"(Prior Revenue − Prior Costs)","sources":[{"node":"input-prior.revenue"},{"node":"input-prior.costs"}]},{"id":"step-value1","label":"(Prior Revenue > 0)","kind":"step","rule":"(Prior Revenue > 0)","sources":[{"node":"input-prior.revenue"}]},{"id":"output-negative_inputs","kind":"output","label":"Negative Inputs","rule":"(((Higher of (Prior Revenue × -1) and 0 + Higher of (Prior Costs × -1) and 0) + Higher of (Current Revenue × -1) and 0) + Higher of (Current Costs × -1) and 0)","sources":[{"node":"input-prior.revenue"},{"node":"input-prior.costs"},{"node":"input-current.revenue"},{"node":"input-current.costs"}]},{"id":"output-identified_change","kind":"output","label":"Identified Change","rule":"Identified Change","sources":[{"node":"step-identified_change"}]},{"id":"output-profit","kind":"output","label":"Profit","rule":"Profit","sources":[{"node":"step-profit"}]},{"id":"step-value3","label":"if (Current Revenue > 0), then Current Revenue, otherwise 1","kind":"step","rule":"if (Current Revenue > 0), then Current Revenue, otherwise 1","sources":[{"node":"step-value2"},{"node":"input-current.revenue"}]},{"id":"output-current_revenue_available","kind":"output","label":"Current Revenue Available","rule":"if (Current Revenue > 0), then 1, otherwise 0","sources":[{"node":"step-value2"}]},{"id":"step-unexplained_change","label":"Unexplained Change","kind":"step","rule":"(Cost Change − Identified Change)","sources":[{"node":"step-cost_change"},{"node":"step-identified_change"}]},{"id":"output-cost_change","kind":"output","label":"Cost Change","rule":"Cost Change","sources":[{"node":"step-cost_change"}]},{"id":"output-prior_profit","kind":"output","label":"Prior Profit","rule":"Prior Profit","sources":[{"node":"step-prior_profit"}]},{"id":"output-profit_change","kind":"output","label":"Profit Change","rule":"(Profit − Prior Profit)","sources":[{"node":"step-profit"},{"node":"step-prior_profit"}]},{"id":"step-value0","label":"Conditional result using (Prior Revenue > 0)","kind":"step","rule":"if (Prior Revenue > 0), then if (Current Revenue > 0), then true, otherwise false, otherwise false","sources":[{"node":"step-value1"},{"node":"step-value2"}]},{"id":"step-value4","label":"if (Prior Revenue > 0), then Prior Revenue, otherwise 1","kind":"step","rule":"if (Prior Revenue > 0), then Prior Revenue, otherwise 1","sources":[{"node":"step-value1"},{"node":"input-prior.revenue"}]},{"id":"output-prior_revenue_available","kind":"output","label":"Prior Revenue Available","rule":"if (Prior Revenue > 0), then 1, otherwise 0","sources":[{"node":"step-value1"}]},{"id":"step-margin","label":"Margin","kind":"step","rule":"if (Current Revenue > 0), then (Profit ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1), otherwise 0","sources":[{"node":"step-value2"},{"node":"step-value3"},{"node":"step-profit"}],"calls":[{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Current Revenue > 0), then Current Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"Profit"}],"rule":"(Profit ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1)"}]},{"id":"output-cost_residual","kind":"output","label":"Cost Residual","rule":"((Cost Change − Identified Change) − Unexplained Change)","sources":[{"node":"step-cost_change"},{"node":"step-identified_change"},{"node":"step-unexplained_change"}]},{"id":"output-unexplained_change","kind":"output","label":"Unexplained Change","rule":"Unexplained Change","sources":[{"node":"step-unexplained_change"}]},{"id":"step-cost_effects","label":"Cost Effects","kind":"step","rule":"if Conditional result using (Prior Revenue > 0), then ((Changes × -1) ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1), otherwise 0","sources":[{"node":"step-value0"},{"node":"step-value3"},{"node":"input-changes"}],"calls":[{"function":"currency_driver_percent","label":"Currency driver percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Current Revenue > 0), then Current Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"(Changes × -1)"}],"rule":"((Changes × -1) ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1)"}]},{"id":"step-unexplained_effect","label":"Unexplained Effect","kind":"step","rule":"if Conditional result using (Prior Revenue > 0), then ((Unexplained Change × -1) ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1), otherwise 0","sources":[{"node":"step-value0"},{"node":"step-value3"},{"node":"step-unexplained_change"}],"calls":[{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Current Revenue > 0), then Current Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"(Unexplained Change × -1)"}],"rule":"((Unexplained Change × -1) ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1)"}]},{"id":"output-comparison_available","kind":"output","label":"Comparison Available","rule":"if Conditional result using (Prior Revenue > 0), then 1, otherwise 0","sources":[{"node":"step-value0"}]},{"id":"step-prior_margin","label":"Prior Margin","kind":"step","rule":"if (Prior Revenue > 0), then (Prior Profit ÷ if (Prior Revenue > 0), then Prior Revenue, otherwise 1), otherwise 0","sources":[{"node":"step-value1"},{"node":"step-value4"},{"node":"step-prior_profit"}],"calls":[{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Prior Revenue > 0), then Prior Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"Prior Profit"}],"rule":"(Prior Profit ÷ if (Prior Revenue > 0), then Prior Revenue, otherwise 1)"}]},{"id":"step-revenue_effect","label":"Revenue Effect","kind":"step","rule":"if Conditional result using (Prior Revenue > 0), then ((Prior Costs ÷ if (Prior Revenue > 0), then Prior Revenue, otherwise 1) − (Prior Costs ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1)), otherwise 0","sources":[{"node":"step-value0"},{"node":"step-value4"},{"node":"input-prior.costs"},{"node":"step-value3"}],"calls":[{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Prior Revenue > 0), then Prior Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"Prior Costs"}],"rule":"(Prior Costs ÷ if (Prior Revenue > 0), then Prior Revenue, otherwise 1)"},{"function":"div_currency_percent","label":"Div currency percent","bindings":[{"name":"denominator","label":"Denominator","value":"if (Current Revenue > 0), then Current Revenue, otherwise 1"},{"name":"numerator","label":"Numerator","value":"Prior Costs"}],"rule":"(Prior Costs ÷ if (Current Revenue > 0), then Current Revenue, otherwise 1)"}]},{"id":"output-margin","kind":"output","label":"Margin","rule":"Margin","sources":[{"node":"step-margin"}]},{"id":"output-cost_effects","kind":"output","label":"Cost Effects","rule":"Cost Effects","sources":[{"node":"step-cost_effects"}]},{"id":"output-unexplained_effect","kind":"output","label":"Unexplained Effect","rule":"Unexplained Effect","sources":[{"node":"step-unexplained_effect"}]},{"id":"step-margin_change","label":"Margin Change","kind":"step","rule":"if Conditional result using (Prior Revenue > 0), then (Margin − Prior Margin), otherwise 0","sources":[{"node":"step-value0"},{"node":"step-margin"},{"node":"step-prior_margin"}]},{"id":"output-prior_margin","kind":"output","label":"Prior Margin","rule":"Prior Margin","sources":[{"node":"step-prior_margin"}]},{"id":"output-revenue_effect","kind":"output","label":"Revenue Effect","rule":"Revenue Effect","sources":[{"node":"step-revenue_effect"}]},{"id":"output-margin_change","kind":"output","label":"Margin Change","rule":"Margin Change","sources":[{"node":"step-margin_change"}]},{"id":"output-margin_residual","kind":"output","label":"Margin Residual","rule":"(((Margin Change − Revenue Effect) − Sum(Cost Effects)) − Unexplained Effect)","sources":[{"node":"step-margin_change"},{"node":"step-revenue_effect"},{"node":"step-cost_effects"},{"node":"step-unexplained_effect"}]}],"topics":[{"label":"Margin and disclosed cost changes","results":["output-comparison_available","output-cost_change","output-cost_effects","output-cost_residual","output-current_revenue_available","output-identified_change","output-margin","output-margin_change","output-margin_residual","output-negative_inputs","output-prior_margin","output-prior_profit","output-prior_revenue_available","output-profit","output-profit_change","output-revenue_effect","output-unexplained_change","output-unexplained_effect"]}]},"usedBy":[]}
