Three-statement model, as FML code and as Excel
Generate a three-statement IFRS model written in FML — the model source, its dimension tables, its sheet layout, and a workbook where every computed cell carries a real Excel formula. Or paste a model of your own and get just the workbook. The point isn't to move to Excel — it's that a model with a source form can be rendered into whatever you already have open.
The workbook is not a picture of a model. Every figure in it is a live Excel formula reading the mapping sheet beside it, so re-point an account and the statements move. The bundle next to it is the same model as source — dimension tables, sheet layout, the model text — ready to validate and push to a planning platform.
Generated model
Bundle artifacts — every file, and what an edit to it does
What feeds what
The statement face, with the formula Excel evaluates
One period shown — every other month is the same formula with its own column letter.
What that replaces
Counted on the options above. An Excel formula is one formula cell on
that statement’s sheet, opening and year columns included; a referenced cell counts every reference
with ranges expanded, so a SUMIF over 37 rows counts 37. An expression is a model
variable that carries a formula. Typed inputs are excluded from both sides.
Why it goes one way
FML to a workbook is a translation: the source already declares the grain
of every variable, the dimensions, and the links between them. Time is one of
those dimensions, so a formula that moves along it says so — a balance that rolls
forward is cumsum(movement, 0, opening), not arithmetic between two cells that
happen to sit side by side. That is what makes the Excel formula unambiguous: the
generator knows which axis became the columns, so it knows that each period refers to the
one before it. Nothing has to be guessed, which is why the same model always produces the
same workbook.
The other direction is inference. A grid declares nothing — a SUMIF
does not say which dimension it rolls up, or that it is a roll-up at all; a column is a
period by convention. And a wrong inference does not fail loudly, it computes confidently
and wrongly. The structure was never hidden in the spreadsheet; it was
lost when the model became a grid.
What the generator produces
The language is FML; .fsl is the extension its codec
reads, the way C++ lives in .cpp. The bundle below uses it so
farseer-dsl can validate and push the model as it stands.
-
model/variables/three-statement.fsl— inputs at the grain where they are natural, P&L subtotals as explicit calc variables, balances ascumsum(movement, 0, opening)with@rollup last, and every value stored positive. -
model/dimensions/*.csv— seven tables, three tiers (Account → *_Analytics → *_Synthetic), each with itsNULL (<Dim>)member. -
model/sheets/statements.sheet— the statement faces with the timeline ON, because these are read by month. Which is why no time dimension appears in a filter or a pin anywhere in that file. -
three-statement-ifrs.xlsx— P&L, balance sheet and cash flow, with Excel outline grouping so you can collapse back to synthetic level, plus three controls —BS_Control,CF_Walk_controlandCF_vs_BS_check— every one of which reads zero or the model is wrong.
What the paste mode understands
- One variable per line, quoted or bare; an indented line continues the one above it.
- A grain in
{ … }. One time dimension becomes the columns; any other dimension is flattened, and the Notes sheet says which. + - * /, parentheses, numbers, variable references.delay(X, n)→ the cell n columns to the left.cumsum(movement, 0, opening)→ a roll-forward off its own previous column.round(X, n)→ROUND().- Anything else — another function, a growth factor inside
cumsum, a name the model never declares — leaves that variable without a formula and a line in Notes explaining why. Nothing is silently approximated.
The workbook carries its own source: the whole model text is written into the Notes sheet, so the spreadsheet can always say where it came from.