Qubit Docs العربية

Creating a metric with the assistant

A metric is a shared definition of a key number, such as revenue or active customers. When it's defined once, every dashboard and every answer from the assistant can use the same calculation.

The assistant can define metrics for you from a plain-language description.

Ask for a metric

  1. Open the assistant and start a New conversation.
  2. Name the metric and explain how it's calculated. Mention the table, columns, and filters if you know them.

Example:

"Create a metric called Net Revenue: the sum of total_amount in the orders table, excluding orders where status is refunded."

The assistant looks at your data first, then turns your description into a query and saves the metric. A card confirms Semantic Metric Created. Click View Metric to open the Metrics page.

Check the result

The metric is saved as soon as the assistant creates it. There is no separate confirmation step, so check it before you rely on it:

  • Open the metric on the Metrics page and review its definition and values.
  • If something is wrong, tell the assistant, for example "Use the invoices table instead of orders." It can update the metric.

If Qubit can't turn the description into a working query, it saves the metric as a draft so you can fix the definition. See Metric definitions.

The semantic model

The same capability lets the assistant work on your semantic model: defining entities, describing how tables relate, and adding metrics there. It reads your existing model and real tables first, checks each change, and doesn't remove existing definitions. See Context-aware assistant.