Skip to content

Adding formulas

A formula defines how a metric is calculated from other metrics and numbers.

Formulas matter for two reasons:

  1. They produce calculated metric values.
  2. They let FinSentry identify drivers. A metric with no formula cannot be broken down, so it gets no drivers.

Where to set them

  • During upload — the "Set formulas" step.
  • Later — the dataset page, under Manage formulas. Editing a formula there recalculates that metric and re-runs anomaly detection for it.

The driver tree page shows how the current formulas connect.

Writing a formula

Piece Examples
Another metric [revenue], [Contribution Margin]
A number 12, 1.5, 0,25
Operators + - * /
Brackets ( )

Example:

( [revenue] - [material_cost] - [labor_cost] ) / [revenue] * 100

By default each metric just uses its own raw column. A metric left this way produces no drivers.

Checks while you type

  • Autocomplete suggests metric names as you type inside [ ].
  • Suggest formulas proposes formulas by looking at the uploaded data — for example, spotting that a margin column always equals revenue minus cost.
  • Formula check compares your formula against the uploaded rows and reports whether it matches: correct, close, or mismatch.

A formula is rejected if it is empty, has unbalanced brackets, starts or ends with an operator, divides by zero, or contains no metric at all.

Choosing metrics for anomaly detection

Each metric has a Run anomaly detection checkbox. Ticked metrics are the ones scanned by anomaly detection.

Getting useful drivers

  1. Leave the basic metrics (revenue, costs, hours) as their raw columns.
  2. Build the metrics you actually manage against — margin, margin %, cost per hour — as formulas over those basics.
  3. Turn on anomaly detection for those calculated metrics.

When one of them goes anomalous, FinSentry can follow its formula down to the basic inputs and tell you which one moved.