Netvisor model

Profit and loss by month

Income statement by month (tuloslaskelma kuukausittain), at account level with the report line alongside so it can be rolled up in BI.

Grain
one row per month x account, income statement accounts only (3000-9999 in the default ranges of staging.netvisor.finnish_account_groups)
Built from
  1. 1
    Raw tables
  2. 2
    Staging
  3. 2
    Core
  4. 1
    Analytics
Reads from Netvisor
accounting_ledger
Ships as
Weld and dbt SQL, open source on GitHub
core.netvisor.profit_and_loss_by_month
1-- core.netvisor.profit_and_loss_by_month
2-- Income statement by month (tuloslaskelma kuukausittain), at account level with the
3-- report line alongside so it can be rolled up in BI.
4--
5-- Grain: one row per month x account, income statement accounts only (3000-9999 in the
6-- default ranges of staging.netvisor.finnish_account_groups).
7-- Currency: the company's accounting currency (EUR).
8-- Sign: `amount` is credit positive, the way an income statement reads: revenue is
9-- positive, costs negative, and SUM(amount) over all lines is the result for the
10-- period. `debit` and `credit` are kept for audit.
11--
12-- Months are calendar months of the voucher date. Fiscal-year totals are a sum over the
13-- months of your fiscal year.
14
15SELECT
16    voucher_month                          AS month,
17    report_line,
18    report_line_sort_order,
19    account_number,
20    SUM(debit)                             AS debit,
21    SUM(credit)                            AS credit,
22    SUM(amount_credit_positive)            AS amount,
23    COUNT(*)                               AS voucher_lines
24FROM {{core.netvisor.general_ledger}}
25WHERE statement = 'income_statement'
26GROUP BY 1, 2, 3, 4

This model and the 4 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().

Notes

How it counts. And where it stops.

netvisor.finnish_account_groups). Months are calendar months of the voucher date. Fiscal-year totals are a sum over the months of your fiscal year.

Raw tables it reads

  • raw.netvisor.accounting_ledger

Put Netvisor in front
of your agents.

Connect Netvisor, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.