Metric Creation Skill
This skill helps the AI Assistant create MAQL metrics. Use this skill when you want to define a new metric, create a calculated measure, build a KPI, or answer a question that requires a metric that does not yet exist. If the Assistant cannot find a matching metric, it asks how the metric should be defined, generates the MAQL expression, and creates the metric for you. This skill creates persisted metrics in the semantic layer.
How It Works
The Metric Creation skill enables the AI Assistant to create metrics in MAQL when an existing metric does not match the user’s request. When activated, the assistant:
- Searches for existing metrics, facts, and attributes
- Determines whether an existing metric can answer the request
- If no matching metric exists, asks follow-up questions to clarify the required business logic
- Generates a MAQL expression using the existing MAQL creation rules already used by the platform
- Creates the metric and validates that it works
- Uses the current conversation context, or creates a suitable preview, to answer the original question with the new metric
The skill can create simple calculated metrics as well as more advanced metrics based on multiple facts, existing metrics, filters, or time logic. It is intended for users who want to create metrics from natural language without writing MAQL manually.
Data Sharing
The Metric Creation skill does not require data sharing with an LLM to function. It remains fully functional when data sharing is disabled because it can search metadata, ask for clarification, generate MAQL using the existing platform rules, and create the metric without sharing computation results. This skill respects your AI Assistant data sharing settings.
Examples
Create a Metric When No Matching Metric Exists
The user asks: What is our gross margin by region?
The AI Assistant then:
- checks whether a matching metric already exists,
- asks for clarification if needed, for example how gross margin should be calculated,
- generates the MAQL expression,
- creates the metric, and
- shows the result using an appropriate preview, such as a table or chart by region.
Create a Percentage Metric
The user asks: Create a metric for gross margin as percentage.
The AI Assistant then:
- finds the relevant facts or metrics, such as Revenue and Cost,
- generates a MAQL expression based on the user’s definition,
- creates the metric, and
- confirms that the metric can be used in analysis.
Create an Average-Based KPI
The user asks: Create a metric for average order value.
The AI Assistant then:
- finds the inputs needed for the calculation,
- builds the MAQL expression,
- creates the metric, and
- returns a result preview based on the current context.
Create a Time Comparison Metric
The user asks: Create a metric for year-over-year revenue growth.
The AI Assistant then:
- identifies the base revenue metric,
- applies the needed time comparison logic in MAQL,
- creates the metric, and
- uses it to answer the original question.
More Example Prompts
- Create a KPI for net revenue retention.
- Build a metric for conversion rate.
- Create a metric for revenue per customer.
- Define a metric for profit margin.
Limitations
- Users need permission to manage workspace metrics to create persisted metrics
- Metric creation depends on the facts, attributes, and relationships available in the logical data model
- If the business definition is ambiguous, the Assistant asks follow-up questions before creating the metric
- If MAQL generation fails, the Assistant explains the issue and may suggest a simpler phrasing or a different metric definition
- The skill uses the existing MAQL creation rules and does not introduce a separate MAQL generation model
This is an experimental feature that is still under active development. Its behavior may change in future releases.