---
title: "PlByDimension"
description: "The P&L cut by department, entity or product."
canonical: "https://lopifi.com/components/pl-by-dimension"
---

# PlByDimension

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

Source: https://lopifi.com/components/pl-by-dimension
Part of: Lopifi — Your VC tech stack partner (https://lopifi.com)

---

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

## Install

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

## Specification

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`).

## 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.
