Vantage Docs
Metrics

Metric models

How do I define measures and dimensions once and reuse them everywhere?

Elly's team kept arguing over revenue because everyone summed it differently in their own spreadsheets. In Vantage she defines revenue once, in the Sales dataset's metric model, and every chart, question and export uses that definition.

You need the editor or admin role in the dataset's project. For a shared dataset you need to be a workspace owner or admin.

What a metric model is

Every ready dataset gets a metric model as soon as it loads. It lists the dataset's dimensions, the columns you group and filter by, such as Facility or Order Date, and its measures, the numbers you add up: a Count of rows and a sum of each numeric column, such as Revenue. Dashboard widgets, Ask Vantage and the MCP server all pick from these names, so a change here shows up everywhere they are used.

Open the model

  1. Open Data and expand the source's row.
  2. On the dataset, select Metrics.
Sales · Metrics with the Members table: id, order_date, facility, item, revenue and qty, each with a title, kind, aggregation, format, hidden box and source

Name and format members

The Members table has a row per column.

ColumnWhat to set
TitleThe name people see, here Revenue and Quantity Sold
AggregationFor a measure: sum, avg, min, max, count_distinct or count_distinct_approx
FormatFor a measure: currency or percent, or none
HiddenTick to keep a member out of widget pickers and AI, like id here

Source shows auto for a member as Vantage built it and refined once someone has changed it.

Select Save at the bottom of the page. Vantage shows Saved, or a message starting "Cube would refuse this model" if the change cannot be used, and keeps the previous model.

Add a custom measure

Under Custom measures, each form adds a measure built from others:

FormBuildsExample
Add filtered measureAn aggregation over the rows that match filtersRevenue at Westlands Depot only
Add ratio measureOne measure divided by anotherRevenue per unit: revenue ÷ qty
Add rolling-window measureA measure over a trailing window, such as 7 dayRevenue over the last 7 days
Add running-total measureA measure added up over timeRevenue to date
Add calculated measureA SQL expression

For example, to add revenue at one facility:

  1. Under Add filtered measure, enter a slug, here depot_revenue, and a title, Westlands Depot revenue.
  2. Choose sum, the column revenue, and the format currency.
  3. Choose the filter column facility, keep equals, enter Westlands Depot, and select Add filter.
  4. Select Add filtered measure, then Save.
Add filtered measure filled in: depot_revenue, Westlands Depot revenue, sum of revenue, currency, with the filter facility equals Westlands Depot

The new measure appears in the list above the forms, with Remove to take it out again. As with the members table, nothing is kept until you select Save.

Joins and performance

Joins connects this dataset to another, so a chart can group the sales by a column from, say, a customers dataset. Choose the target dataset, the relationship (many_to_one, one_to_many or one_to_one), and the column on each side, then select Add join.

Performance has Speed up this dataset: tick it and choose the time dimension, and Vantage keeps a summary of the dataset by that date so charts over it answer faster.

Export downloads the model as a JSON file, for use in a pack.

Next

On this page