# ForecastTable

> Projections dashed and labeled everywhere.

Source: https://lopifi.com/components/forecast-table
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/forecast-table
```

## Specification

Driver-based projections with scenarios. **Projections render dashed** on every chart and carry a "forecast" label on every figure. Actuals-to-date and forecast-remaining are visually distinct within the same period.

The boundary between what happened and what is believed is drawn in three places, not one.

**Between periods.** Everything after the last closed period is shaded, ruled with a dashed edge, set in the secondary tone, and headed by a column that says `forecast` under its label — so every projected figure on screen sits beneath the word rather than merely near it.

**Within a period.** The month that has started and not finished is not one column; it is three — what has posted, what is expected for the rest, and the landing they sum to. A part-elapsed month reported as a single figure sits beside eight closed ones and inherits their authority, which is the difference between "we are at 41.2 with nine days to go" and "we did 58.2" — the second of which nobody said and everybody quotes. The landing is **computed from the other two**, never supplied: a caller who provides all three will eventually provide three figures that do not add up, and the grid would render the contradiction without noticing it.

**Between scenarios.** The scenario in force is named in the caption and in the toolbar. It will not rank them and will not style one as the good case — an unlabelled forecast is indistinguishable from a claim, and a ranked one is a recommendation wearing a forecast's clothes.

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