Skip to main content

Reports by department, project, or any dimension

Tag entries with a department, project, or any dimension you define when you book them, then ask for a profit and loss broken down by that dimension, with an explicit bucket for anything left untagged.

ERPClaw can split your numbers by department, project, cost center, location, fund, or any label you define. The trick is two steps: tag an entry when you book it, then ask for the report. “Show me this month’s P&L broken down by department” is all it takes once your entries are tagged.

Tag entries when you book them

When a posting belongs to a department or a project, tag it at the time you book it:

add-journal-entry posting_date=2026-06-12 entries='[
  {"account": "Office Supplies", "debit": 120.00},
  {"account": "Cash", "credit": 120.00}
]' --dimension-key department --dimension-value Engineering

The same --dimension-key / --dimension-value pair works when you raise an invoice or record a payment. That tag is what makes the entry show up under the right heading later. You do not add a “cost center” column or keep the attribution in a spreadsheet on the side; the tag travels with the posting for good.

Ask for P&L by a dimension

Once entries are tagged, ask for the breakdown:

profit-and-loss --group-by department --from-date 2026-06-01 --to-date 2026-06-30

You get revenue, expenses, and net for each department, across your income and expense accounts. Without the flag you get the single company-wide profit and loss exactly as before. You group by one dimension at a time, so pick the lens you want for this report: department, project, or whichever you defined.

The (untagged) bucket

Anything that is not tagged with the dimension you asked for is never dropped from the report. It lands in an explicit (untagged) bucket of its own. That means the parts always add back up to the company total, and you can see at a glance how much is still unattributed and worth going back to tag.

Define your own dimensions

Out of the box you can tag by project, department, and cost center. Add the ones your business actually runs on, like region, fund, campaign, or store:

add-dimension --name region
list-dimensions
update-dimension --name region --label "Sales region"

When a dimension has run its course, retire it:

deactivate-dimension --name region

Retiring one is blocked while recent entries still reference it, so you cannot orphan live data by accident. And if you ask to group by a dimension that was never registered, or one you have already retired, ERPClaw stops and points you back at list-dimensions instead of handing you a confusing empty split.

Beyond the P&L

Profit and loss is the common ask, but the same tags drive more:

  • multi-dim-trial-balance --group-by "project,department" breaks the whole trial balance out across more than one dimension at once.
  • dimension-balance-report --dimension project gives one dimension’s balances on their own.
  • trial-balance, balance-sheet, cash-flow, and general-ledger all accept --dimension-key / --dimension-value filters to narrow a report to one department or project. On profit-and-loss those filters apply first and the grouping happens after, so you can scope to one project and still split it by department.

What is next