Version 0.6-draft. The model can still change before version 1. Every change is in the changelog.

A consumer goods company makes food, drinks, home care and personal care products. It sells them to retail chains, independent shops, wholesalers, hotels and restaurants, and web shops in six countries.

Finance plans and reports the P&L per customer, product and month. Actuals come from the ERP system. Planners make the budget, two forecasts and a what-if.

Each country plans in its own currency. Three use the euro, and Poland, Czechia and Hungary their own. Standard costs and the central marketing budget are set in euros and convert at each version's rate. The P&L is also reported in euros.

The P&L

LineHow it is computed
Gross SalesUnits × the list price in the customer's country
− Standard DiscountsGross sales × the rate agreed with the customer group for the brand
− Promo DiscountsGross sales × the promotion rate, in promotion months
− Logistics DiscountsGross sales × the customer group's rate for delivery to its own warehouse
= Invoice Sales
− RebatesInvoice sales × the customer group's rebate rate
− Growth BonusA rate on the whole year's sales, if the customer group beats last year by more than its threshold
− Trade FeesListing, shelf and promotion fees per customer group and brand, spread by sales
− Promo FundingPayments per customer and product after a promotion
= Net Sales
− Cost of Goods SoldUnits × standard cost
= Gross Margin
− LogisticsWarehouse and transport costs per country, spread by shipped weight. Chilled and frozen goods count more.
− Sales ForceSales team costs per channel and country, spread by sales
= Contribution Margin II
− MarketingBrand spend per country, spread by net sales
= Contribution Margin III
− OverheadsAll other operating costs, per country
= EBIT

Everything down to gross margin is computed per customer, product and month. The costs below it are fixed per country, channel or brand, so the contribution margins stop at customer and brand.

Actuals and plan

Actuals run from January 2023 to June 2026. Each version shows actuals in its closed months and plan in the others. The 2026 Budget is all plan. FC 3+9 has three months of actuals and nine of plan, and FC 6+6 six of each. The What-if starts from FC 6+6 with its own inputs.

The plan is made like this.

Dimensions

Each arrow means "rolls up to".

A customer is the account that places the order. A customer group holds the trade agreement, such as a chain's head office or a buying group. Several ERP codes, such as a promo pack, make one planning SKU.

Why it is hard to run

Each of these is common in real planning models. Together they make one typed number move many others.

The model in FML

The model is written in FML, the Financial Modeling Language. Each variable is a cube of numbers. It has a name, the dimensions it is broken down by, and a formula.

"Gross Margin" { Customer, SKU, Versions, Years, Months } = "Net Sales" - "COGS"

Gross Margin holds one number per customer, SKU, version, year and month.

A variable without a formula is an input, loaded from files or typed by planners. Systems that do not read FML run a translation, and it must give the same numbers. The full model description has the calculation rules, and the model files have every formula.

Not in this version: balance sheet and cash flow, headcount, inventory, weekly plans and constant-currency reports.