Docs › Find and understand

For everyone

Metrics and asking for a number

How KRISID composes a governed query from the semantic layer — and never runs it.

Ask can turn a question such as "net revenue by region last quarter" into a query you can run. It uses the metrics your organisation has defined. It also tells you which grain the query uses and which role you would need to run it. It never runs the query and never reads your data.

What a metric is

A metric is a number your organisation has defined once, such as Net Revenue or Order Count. Each metric belongs to a semantic model. The model records how the number is worked out, what it can be broken down by (its dimensions, such as region) and any named filters (its segments, such as completed orders).

Metrics are assets like any other, so each one has its own page with a description, an owner and a status. A metric whose status is Approved is shown as certified. Stewards maintain metrics on the Semantic model screen. See Editing the semantic model.

Ask for a number

  1. Open Ask.
  2. Type the metric and how you want it sliced, for example net revenue by region last quarter.

Ask composes a query when your question names a metric and asks for a number. It does that in one of two ways:

  • A slice: by region, a named segment of the model, or a time period such as last quarter or by month.
  • A quantity: starting with how much, how many, number of or count of.

A metric's name on its own, such as net revenue, is treated as a search. You get the metric's page and anything related to it, not a query.

The answer sentence shows what Ask understood: the metric, each by, each segment and the time period.

Time periods Ask understands

You type Ask uses
last quarter, this quarter that quarter
last month, this month that month
last year, this year that year
last 30 days, last 2 quarters that span, counting back from today
in 2025 that calendar year, by month
by day, weekly, by quarter, annually how the result is grouped

For every kind of question Ask reads, see What Ask understands.

Read the answer

The answer card shows:

  • The metric's name, whether it is certified, and open the metric, which goes to its page. The time period is shown beside it.
  • The description, in the metric's own words.
  • grain: what one row of the underlying data is, for example one row per order rather than per line item. Most wrong numbers come from using the wrong grain, so check it before you use the result.
  • the query: the SQL, written for the source it reads. Press Copy SQL to copy it.
  • to run it: the role you would need, for example "you would need FINANCE_ANALYST", then the tables the query touches. Each role named can read all of those tables, and beside it is how it holds that access, such as granted on the schema or inherited from another role. Press a role to open its page.
  • A list of notes, where there are any. For example, a metric that is not certified is correct but not warranted for reporting.

Important: KRISID composes the query but never runs it. It reads your metadata, never your data. Run the query wherever your data access is governed, such as your warehouse's worksheet.

When the role is not known

The role comes from the grants KRISID reads from your warehouse when it harvests. It is not something anybody typed in.

  • If no source has been harvested yet, to run it says the role is not known.
  • If several roles can each read some of the tables but no single role can read all of them, it says so and names them.
  • A simulated harvest chip means the grants come from demonstration data, not from a real warehouse.

When Ask refuses

Some questions cannot be answered correctly with one query. Ask then shows a refusal and no SQL, because a wrong query looks the same as a right one.

  • would count twice: the query would count the same rows more than once. This happens when two metrics live on different models, or when a join means each row would match several others. The message says which models are involved and what to ask instead.
  • not possible: for example, you asked to slice by something the model does not have. Ask names the dimensions you can use instead. It also refuses a query that would need to read two different source systems at once.

Ask does not guess a formula for a number that has no metric. If you need one, ask a steward to define it.

Other questions that give you SQL

A question such as "where is customer email stored" finds the tables that hold it. It also gives a query to start from, to query with the table's full name, and to run it. A careful line warns about columns with sensitivity marks, and who sees it says which roles can read them. That query is a starting point, not a governed query built from a metric.

Good to know

  • KRISID records that a query was composed: which metrics, and who asked. No data is recorded, because none is read.
  • If a steward has edited a metric's description on its page, that edit wins over the model file. See Editing the semantic model.