Dashbreeze logo

Building a Custom Metric

Building a Custom Metric - Create and edit reusable metrics by combining table columns, saved metrics, fixed numbers, and math operators.

Create and edit reusable metrics by combining table columns, saved metrics, fixed numbers, and math operators.

A custom metric turns your table data into a calculation that updates with your dashboard — revenue per order, profit margin, conversion rate, growth over time, anything a formula can express.

Build it from table columns, saved metrics, numbers, and operators. Dashbreeze shows the result as you go, and once it's saved, any KPI or Gauge in your workspace can reuse it.

A KPI block's Edit panel with Saved metric selected under Value, next to the dashboard it belongs to.

Create a custom metric

  1. Open Metrics in the left sidebar and select Create metric — or open any KPI or Gauge, select Create new metric, then Build a custom metric.
    The Metrics page with Create metric selected in the top-right corner.
    Create metric from the Metrics page
    A KPI block's Data settings with Build a custom metric selected.
    Build a custom metric from a KPI or Gauge
  2. Name the metric — Revenue per order, for example — then choose Start from scratch or pick a metric template.
    The new metric panel with Start from scratch and Start from a metric template options.

Start from scratch: revenue per order

Start from scratch opens an empty formula: add a table column or saved metric, choose an operator, add the next value, and keep going until the formula is complete. Say your Orders table has a Revenue column and an Order ID column — to find the average revenue per order, build this formula:

Sum of Revenue ÷ Count of Order ID
  1. Select the table column or saved metric you want to use first — add Revenue and leave its calculation mode as SUM, since you want the total revenue across every order.

    The metric builder's Add to formula panel with Revenue found by search and added to the formula as SUM Revenue.

    Each column becomes one value first:A calculation mode tells Dashbreeze how to turn a column into one number — SUM, AVG, CNT, DST, MIN, or MAX, depending on the column type. Select the badge on a column to change it.

  2. Choose an operator to combine it with the next value — select the divide operator ÷.

    The divide operator selected in the formula toolbar, with a Checks warning that the formula still needs a value at the end.
  3. Add the next piece of the formula — add Order ID and switch its calculation mode to CNT, so Dashbreeze counts how many orders there are.

    Order Id added to the formula with its calculation mode badge open, showing Count and Count distinct with Count selected.
  4. Check the live result and the In words summary — it should read back as "Sum of Revenue divided by Count of Order ID" and match the question you're asking.

    The In words summary reading Revenue per order is sum of revenue divided by count of order id, with a live preview result.
  5. Choose a number format and decimals so the result displays the way you want, confirm Checks shows Ready, then select Save metric to store it in your workspace.

    The Result panel with Currency format and USD selected, and Checks showing the metric is ready to save.

Start with a template: profit margin

A template sets up the whole formula — you only pick what feeds into it. Templates cover common calculations, including Conversion Rate, Growth Rate, Profit Margin, ROI, Customer Acquisition Cost, Churn Rate, and Lifetime Value. For example, the Profit Margin template builds this formula:

(Revenue − Cost) ÷ Revenue
  1. Choose the Profit Margin template and review what it measures — profit as a share of revenue.

    The Pick a starting point panel with the Profit Margin template selected under Start from a metric template.
  2. Match Revenue and Cost to the matching columns in your Orders table or a saved metric. When you finish, click Use these.

    The Profit Margin template panel with Revenue and Cost matched to table columns and Use these highlighted.
  3. Dashbreeze builds the formula and opens it in the builder — every piece is still yours to change if you want. Check the live result, confirm Checks shows Ready, then select Save metric.

    The completed Profit Margin formula with a 43.10% preview and the Save metric button highlighted.

Build your formula

A formula is built from four kinds of pieces, mixed in whatever order the calculation needs:

The metric builder highlighting the search panel for tables and saved metrics, and the operator toolbar below the formula.

Table columns

Add a column, then pick how to calculate it — Sum, Mean, Count, Count Distinct, Minimum, or Maximum.

Saved metrics

Reuse a metric that already exists in your workspace instead of rebuilding its calculation.

Operators

Add, subtract, multiply, or divide values. Use parentheses when part of the formula needs to run first.

Fixed numbers

Type a target, percentage, multiplier, or any other number straight into the formula.

Order matters:Multiplication and division run before addition and subtraction. For profit margin, use (Revenue − Cost) ÷ Revenue so Dashbreeze subtracts the cost first.

Filter a value

A filter applies only to the table-column chip where you add it — calculate Sum of Revenue where Channel contains Website, or compare this month's revenue with last month's.

A filter condition on the Revenue chip narrowing the formula to rows where Channel contains Website.

When a filter has more than one condition, choose how they combine:

  • AND: every condition must match. Use this to narrow down to a specific combination, for example Channel contains Website and Order Status contains Completed.
  • OR: any condition may match. Use this when several different answers should count, for example Channel contains Website or Order Status contains Completed.

Add an IF condition

Use IF when a metric should return different values depending on a condition — if Revenue is less than 2000, return 1; otherwise, return 0.

An IF/THEN/ELSE formula returning 1 when the sum of Revenue is less than 2000, otherwise 0.
  1. Select IF in the calculator.
  2. Choose the left value, a comparison, and the right value.
  3. Build the value the THEN branch returns.
  4. Build the value the ELSE branch returns.

IF conditions cannot be nested:You cannot place another IF inside an IF condition or its branches. Finish the IF, then combine its result with other formula pieces.

Use Formula text

Prefer typing? Open the Formula text tab, edit the formula, then select Apply to builder to validate it and update the visual formula.

The Formula text tab with a typed SUM and COUNT formula and the Apply to builder button highlighted.
SUM(Orders.Revenue) / COUNT(Orders.Order_ID)

Use exact source names:Table, column, and saved-metric names must match the names in your workspace. Dashbreeze shows what to correct when it cannot read the formula.

Common issues and how to fix them

Editing changes every connected block:Saving an existing metric updates it rather than creating a copy. Every KPI and Gauge connected to that metric will use the new formula and formatting.

Up Next