PlByDimension
The P&L cut by department, entity or product.
npx shadcn add @lopifi/pl-by-dimensionExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
By entity, controlled
Controlled: the host opens on Entity and hears every switch through onDimensionChange.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
The P&L cut by department, entity, product or region instead of by period. Same lines, different question, and it's the question the department head came to ask.
Total is a column computed from the members beside it plus anything unallocated, never supplied separately. A total that doesn't equal its parts loses the room.
Unallocated is its own column, not a rounding and not an allocation. Some corporate costs belong to no department, and spreading them on a rule nobody agreed to gives the department head a P&L they can't argue with.
API change: PlDimensionLine.polarity is now required, no default — read it from the account type with polarityForAccountType (it previously fell back to standard).
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Metrics & analysis
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section PlByDimension renders in, the calculators behind its figures, and the ledger payloads that feed it.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when Metrics & analysis changes
Your copy doesn’t update itself when we fix something here.
- One email when a Metrics & analysis component needs a migration
- Nothing when nothing changes
Or install it now