Skip to content

Metrics · · 3 min read

Creating and editing a metric definition

Each Snowfire metric holds one definition, its formula and its sources. View and edit the SQL behind a metric and rerun its chart.

What it’s for

The governed number layer. Each metric holds its definition, its formula and its sources. From a metric’s detail view you can see and edit the SQL behind it and rerun the chart. If the data is older than the default time window, a warning says so before you read the chart. This article covers how to read a metric, change its SQL and details, and create a new metric from an existing one.

Before you start

  • Editing SQL is part of the Admin role.
  • You see a metric only when you have access to its data sources.
  • A new metric starts as a copy of an existing one, so open the metric closest to what you need.

Steps

Open the metric

  1. Open Metrics and select the metric.
Metric page for Annual Recurring Revenue with its description, formula, chart and details
A metric: overview, chart and details.
  • Overview: the description and formula, with a chart.
  • Details: source, business units, expected trend (positive, negative or neutral), created and updated dates, and the data source range.
  • History: changes to the metric.
  • Favorited by: who starred the metric.
  • Members: people with access to the metric’s data sources, through company admin or connector permissions.

Edit its SQL

  1. Choose View SQL to see the query behind it.
  2. Choose Edit, then change the query. Prettify SQL tidies its layout.
  3. Choose Validate. It reads No issues found in this SQL, or lists each issue with Go to line.
  4. Choose Refresh chart in the same view to check the result.
  5. Choose Save. If issues remain, Snowfire asks you to fix the SQL issues before saving.
SQL view of the Annual Recurring Revenue metric with Edit, Save as, Validate, Prettify SQL, Refresh chart and Send to chat
View SQL on a metric.

If you leave with unsaved changes, Snowfire asks Leave without saving? Choose Stay on page to keep working, or Leave without saving to drop the changes.

Create a new metric with Save as

  1. Open the metric closest to the one you need and choose View SQL.
  2. Choose Save as.
  3. Under Metric name, replace Copy of and the original name with the new name.
  4. Change the query, then choose Validate and Refresh chart to check the result.
  5. Choose Save. Snowfire confirms Metric created and opens the new metric.
Save as in the SQL view of Annual Recurring Revenue (ARR), with Metric name set to Copy of Annual Recurring Revenue (ARR), the query below, and Cancel, Save and Validate
Save as: name the new metric, then save.

Set its details

  1. In Details, choose Add business unit to add the teams the metric belongs to.
  2. Set Expected trend to Positive, Negative or Neutral. It helps the AI understand whether the metric is better when it goes up, down or stays flat.
  3. Choose Favorite to follow the metric yourself.
  4. Use the Active switch to keep the metric in Internal Signals or exclude it.
Details panel on a metric with business units, Expected trend set to Neutral, Created, Data source range, Updated, View history, Favorited by, Members, Favorite and the Active switch
Details on a metric.

Turning Active off asks Exclude from Internal Signals? The metric stays in the catalog, but Snowfire stops using it for new Internal Signals. Tick Also archive existing Internal Signals for this Metric to archive the ones it already made, then choose Exclude Metric.

Use the other actions

  • Save as: save a copy under a new name.
  • Send to chat: ask about the metric in Chat.
  • Download data: export the data behind the chart.
  • Exclude from Internal Signals: stop Internal Signals for the metric.
  • Archive or disable: retire a metric you no longer need. Disabled metrics move to the Disabled tab.

Check and fix

Check a new or edited metric by asking about it in Chat. Under Metrics used in the answer’s sources, it lists the metrics that were pulled, fetched or created for the answer.

ProblemFix
Save is greyed out in Save as.Give the new metric a name and keep a query in the SQL view.
Save says Fix the SQL issues before saving.Choose Validate, then Go to line on each issue.
A metric is still calculating.It finishes when its query completes.
A query returns no rows.It is reported as an empty result. Check the SQL and the data source range.
View SQL says This metric has no SQL to display.The metric has no query to show.
Validate says Enter a SQL query to validate.Add the query first.
Failed to save as a new metric.Try Save as again.

Related articles

Can't Find What You Need?

Our support team is here to help. Get in touch and we'll respond within 24 hours.