Skip to main content

Combine Metrics with Widget Formulas

Introduction

Quick stats show you one number — tickets created, tickets solved, messages sent. But the metrics your team actually steers by are usually a combination of two numbers: a resolution rate, a backlog gap, a per-agent ratio. Widget Formulas let you build those directly on a dashboard: pick two quick stats you have already saved, choose an arithmetic operation, and Qvasa computes the result as a live widget.

Here is a dashboard built entirely from two plain quick stats — Tickets Created and Tickets Solved — plus one formula widget for every operation:


The Five Formula Operations

  • Percentage — numerator ÷ denominator × 100. Example: Tickets Solved ÷ Tickets Created as a Resolution Rate of 79.93%.

  • Difference — first metric (A) minus second metric (B). Example: Created minus Solved as Net New Backlog. Great for missed-work counts a percentage hides, and negative results are allowed.

  • Sum — A plus B. Example: Created plus Solved as Total Ticket Activity.

  • Product — A times B. Useful for projections and rate-times-volume math.

  • Quotient — A divided by B, not multiplied by 100. Display it as a rounded decimal (1.25) or as a fraction (223/279) — your choice via the Data Format dropdown.


Before You Begin

  • You need edit access to the dashboard.

  • Formulas combine widgets that are already saved on the same dashboard. Add the quick stats you want to combine first — for example Tickets Created and Tickets Solved — then build the formula from them.

  • Each component keeps its own date range and filters, and the formula combines whatever those components compute. The date shown on a formula card is the window its components actually used, so give the components matching date ranges unless you deliberately want to mix windows.


Step 1: Open the Widget Formulas Tab

Open your dashboard, click Edit, then click the + button at the end of a row to add a widget. In the widget picker, choose the Widget Formulas type on the left — all five operations appear in the middle column:

Step 2: Pick an Operation and Its Components

Click an operation to configure it. For a Percentage quick stat you pick the numerator and the denominator from dropdowns listing the quick stats saved on this dashboard. Here we divide Tickets Solved by Tickets Created to get a resolution rate:

Click Add Widget and the formula lands on your dashboard, computing live like any other widget.

Step 3 (Quotient Only): Choose a Data Format

The Quotient operation adds one extra choice — Data Format. Decimal shows a rounded number like 1.25; Fraction (A/B) shows the two values side by side, like 223/279:


Formulas Follow Your Dashboard Filters

A formula reacts to the dashboard's quick filters bar the same way the cards around it do. Pick a brand, a group, or a date in the bar at the top of the dashboard and Qvasa applies it to every component of the formula, at every level of nesting, then recalculates. A formula card always equals the arithmetic you would do by hand on the component cards sitting next to it — filtered, or cleared.

Where a quick filter covers the same field a component already filters on, the quick filter wins for as long as it is applied. That is the same rule every native widget follows, so a dashboard stays internally consistent. Clear the bar and each component returns to its own saved filters. Full detail on precedence lives in the Comprehensive Guide to Filters in Qvasa Dashboards.

The date label on a formula card names the window its components used. When the components share a window it reads like any other card, for example Previous week (Sun–Sat). When they use different windows it reads Mixed dates followed by each one, so a mismatch between components is visible on the dashboard instead of hidden inside the number.


Nesting: Formulas Built from Formulas

A formula's components do not have to be plain quick stats — they can be other formula widgets, nested up to 5 levels deep. In the dashboard above, "Backlog Share" is a percentage whose numerator is itself a formula: (Created − Solved) ÷ Created. Formula widgets appear in the component dropdowns with a "(formula)" suffix.


See How a Number Was Calculated

Every formula card carries a calculator icon next to the filters icon in its top bar. Hover it and Qvasa shows the arithmetic behind the number you are looking at: the formula with each component's value filled in, such as (39 + 0) = 39, and one line per component metric with its value and its date range.

Nested formulas are expanded in place, so a three-level formula shows the whole chain rather than a single intermediate total. It is the quickest way to confirm a surprising result really is the sum of its parts, and to spot the one component pointing at the wrong metric or the wrong window.

The same breakdown is available over the User Access API. A formula result from POST /dashboard_widgets/:id/query includes an extra_context object with the summary and a details line per component, alongside date_filter_display_text and operand_date_filter_display_texts.


Good to Know

  • Division by zero is safe. A quotient with a zero denominator shows N/A (decimal) or A/0 (fraction) instead of erroring. A percentage with a zero denominator shows the numerator × 100.

  • Just-added quick stats not in the dropdowns? Refresh the page — the component dropdowns are loaded when the page opens.

  • No circular references. Qvasa rejects a formula that would reference itself through its components, and any chain deeper than 5 nested formula levels.

  • A formula's value always comes from its components. Set the date range and filters on the component widgets, and use the dashboard's quick filters bar to move the whole dashboard at once — that is what a formula reads.

  • Over the User Access API, POST /dashboard_widgets/:id/query returns a formula computed from each component's saved filters, exactly as it does for native widgets on that endpoint. To query a filtered value, point the formula at components that carry the filters you want in their own configuration.

  • Deleting a component breaks the formulas built on it — they will report the missing metric (for example "Numerator widget not found") until you edit them to point at another widget.

If you have any questions, reach out to the Qvasa team — we are happy to help.

Did this answer your question?