# PlByDimension

> The P&L cut by department, entity or product.

Source: https://lopifi.com/components/pl-by-dimension
Part of: Lopifi — US GAAP books on autopilot, reviewed by a CPA (https://lopifi.com)

---

- **Family:** Metrics & analysis — ---
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/13-metrics-and-analysis

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/pl-by-dimension
```

## Specification

The profit and loss cut by department, entity, product or region rather than by period. Same
lines, different question — and the second one is what the department head is in the room to ask.

Total is a column and it is computed from the members beside it plus whatever is unallocated,
never supplied separately. A total that does not equal its parts loses the room.

Unallocated is its own column, not a rounding and not an allocation. Corporate costs that belong
to no department exist, and spreading them on a rule nobody agreed to is how a department P&L
becomes something its owner cannot argue with.

## Rules this component obeys

Money is minor units, never floats. `null` is not `0` and neither is redacted. Negatives render in accounting parentheses with the parenthesis column reserved on both sides. Debit and credit are two columns. Per-currency decimal places. Polarity is explicit — up is not always good. Every figure states its period, entity, currency, basis and as-of.
