Metric building best-practices
Metrics are invaluable tools for measuring and analyzing data in your analytics or reporting system. They provide crucial insights into various aspects of your business or operations. In this guide, we'll walk you through the best practices and key steps to creating accurate, effective metrics.
Key steps
Creating a metric in Sightfull is more than just compiling data; it's an art of translating a business question into the metrics that provide answers that are quantifiable and actionable. To ensure the highest utility and accuracy of your metrics, it's important to follow a structured approach from business question to reliable metric:
-
Clarify the question: Start with a clear, specific business question that this metric should answer. This defines your objective and intention in the metric-building process.
-
Choose the appropriate metric type: Your business questions should directly determine the type of metric you need to give meaningful answers.
-
Configure the metric schema: Identify the relevant data sources and
entities
that capture the information you are looking to track and clearly define how it should be calculated to accurately answer your question. This includes detailing the required filters, operations, and time-series for the metric to accurately reflect the patterns and trends in the data. See the step-by-step guide below to configuring the metric schema. -
Test and iterate: Once your metric is created, test and validate it to ensure it answers the business question accurately. You can quickly test metric results and iterate your schema configuration.
Clarify the question
Developing a meaningful metric in Sightfull begins with formulating a clear and targeted business question. This process ensures your metric accurately addresses a specific area of your business. Follow these steps to quickly compose business questions that can be easily translated to effective metrics:
- Define your objective: Pinpoint the key aspect of your business you want to analyze. For example, if you are focusing on sales efficiency, your objective might be to understand the speed and effectiveness of your sales process.
- Identify key aspects: Next, consider which specific elements will provide insight into your objective. In our sales efficiency example, relevant aspects might include the duration of sales opportunities from creation to closure.
- Formulate the question: Using the identified objective and relevant aspects, craft a question that is both specific and directly relevant to your business needs. For instance, based on our sales efficiency objective and focus on sales duration, the question could be: "What is the average time to close sales opportunities each quarter?"
This systematic approach ensures that the resulting question is not only precise but also directly aligned with your business goals. This creates a solid foundation both for subsequent metric-building as well as the metric-interpretation process.
Choose metric type
Once we have our business question well-defined, it should directly dictate the metric type we require to provide accurate and meaingful answers. Ask yourself:
Do we need to aggregate data or combine other metrics to calculate the metric?
If the metric aggregates quantities in entities
, we need to use an Aggregate type metric.
If we need to combine other metrics to arrive at the metric result, we need a Formula metric.
This question helps us decide the Structural type of the metric and schema we will need to configure.
Does the metric capture a snapshot of quantities or track changes in a given period timeframe? If we need a snapshot of a certain volume, we will use a Stock metric. If we're measuring what changed or happened within the time period, we need a Flow type metric.
Do we need to compare component metrics or build-up a total from select parts? If we're comparing quantities, we'll use a Ratio metric. If the metric breaks down a total amount into its' component parts, the Waterfall metric is required.
By answering these straightforward questions, you can accurately determine the most fitting metric type. For our example business question, an Aggregate Flow metric will effectively measure the dynamic aspect of opportunities' cycle length across each period.
Create metric schema
Once you have defined your business question and identified the appropriate metric type, the next step is to create the metric schema. This involves setting each schema property to ensure accurate metric calculation.
See the tables below to see the metric schema properties (based on their Structural type) and understand how to set each property correctly to achieve your intended results:
Aggregate metric schema
This table outlines the schema properties of Aggregate metrics:
Property | Definition | Example |
---|---|---|
metric_name | What name reflects the metric means? | average_sales_cycle_length |
entity | What data entity is the metric measuring? | opportunity |
filters | What criteria should the data meet to be included in the metric? | - sql: $is_closed = true |
joins (optional) | What additional data do we need from related entities to calculate the metric? | See joins documentation |
operation | What calculation should be performed on the relevant data values? | avg |
measure | What specific dimension or equation represents the metric value for each entity ? | $close_date - $created_date |
x_axis | What are the criteria for data to be used in calculating the metric result for each period? | See X-axis documentation |
In our example, to answer the question of "What is the average time to close sales opportunities each quarter?" we create the following Aggregate Flow metric schema:
- name: average_sales_cycle_length
entity: opportunity
filters:
- sql: $is_closed = true
operation: avg
measure: $close_date - $created_date
x_axis:
period:
- sql: $macros.PERIOD_IN($close_date)
Formula metric schema
The table below outlines the schema properties of Formula metrics:
Property | Definition | Example |
---|---|---|
metric_name | What name reflects the metric means? | opportunity_win_rate |
entity | What data entity is the metric measuring? | opportunity |
formula | What equation represents the metric value for each entity ? | $metric__won_opportunities / $metric__closed_opportunities |
Test and iterate
After creating your metric, it's crucial to ensure its accuracy and utility.
Validate metric results
Test the accuracy of your metric calulation by:
- Running on sample of a few specific
entities
to see results match your expectations. - Cross-verifying with existing reports or sample data.
Iterate on the metric schema
Make any necessary adjustments to your metric schema:
- Adjust filters to ensure only (and all) relevant data is included.
- Modify x_axis configuration to capture the correct values in each period.
- Refine the measure property to make sure the metric is correctly calculating the value of each relevant
entity
.
Keep building
Creating your first metric or set of simple metrics in Sightfull is only the beginning of designing your Metric Layer and building up your data analytics stack.
Follow these steps to keep moving forward:
Build on foundations and use your initial metrics as building blocks. Don't hesitate to expand on them to deliver more prespectives, more nuanced results or more advanced analyses.
"Use metrics like Legos. Play and build anything you can imagine."
Get regular feedback to bring in fresh perspectives, make sure everyone is aligned on key metrics and continuously adjust and expand your metrics to cover analytical needs across your organization.
"Feedback is a compass, guiding the evolution of your metric layer."
Embrace adaptation and complexity through experimentation and an iterative approach to analysis through building with metrics. Combine metrics for complex calculations and explore different metric types to answer diverse questions.
"Build your metric layer as a robust foundation for highly complex analytics; solid but flexible."
Remember, every metric you build adds to understanding and reflecting the reality of your business. Keep exploring, keep questioning, and keep building your metric layer.
Wrapping Up
The process of building your first metric in Sightfull is a journey from a specific business query to a data-driven answer. This guide has walked you through each crucial step, from defining your metric to refining it for precision. As you advance, delve into more complex metric structures and explore further resources to enhance your understanding of Sightfull's capabilities. Remember, effective metric building hinges on clarity, relevance, and constant iteration.
For further learning, read up on metric types or explore the metric syntax in-depth; including filters, joins, periods, x-axis and measure configurations.