Skip to main content

Measure

Understanding the 'measure' property in Sightfull metrics is essential for creating precise and informative data analyses. This documentation provides insights into the use and versatility of the 'measure' property across different metric types, guiding users to more effectively harness its capabilities for advanced analytics.

What is the metric measure?

The measure property in Sightfull is pivotal for defining the specific data point or calculation in your metrics. This section explains how to effectively use this property, whether you're summarizing data in Aggregate metrics or applying complex calculations in Formula metrics. It guides you on selecting the right type of measure – from single dimensions to intricate equations – ensuring your metrics accurately capture and reflect what you intend to track.

Aggregate measure

In Aggregate metrics, the combination of operation and measure properties is used to perform a specific operation on a subset of data or a group of entities. This allows for the aggregation and summarization of data based on defined criteria.

operation property

The operation property of the metric defines what mathematical operation the metric performs on the data. The following table outlines various operations that can be performed using the operation property in Sightfull:

OperationDescriptionExample
sumSums the measure values.Sum of total sales amount.
countCounts the number of entities.Count of total customers.
avgCalculates the average measure value.Average deal size.
maxFinds the maximum value.Maximum lead count in a month.
minFinds the minimum value.Minimum time duration in stage.

measure property

For each entity that meets the metric criteria (see Filters), the measure property defines the metric value of the entity. This value can be based on a single quantitiative dimension or an equation containing multiple dimensions, constants and operations between them.

Single Dimension

This involves a value of a specific dimension from the main metric entity or a related object through a one-to-one join, allowing focused analysis on a singular aspect.

Multiple Dimensions

Multiple dimensions can be used in an equation or for aggregating values using SQL operations. Examples include:

  • Calculating duration by subtracting two datetime fields.
  • Performing mathematical operations, like multiplying a field by 100 for percentages.
  • Applying SQL functions like least() or greatest() on entity dimensions.
  • Aggregating data from one-to-many joins with functions like max(), min(), sum(), count(), count(distinct).

Examples

Single Dimension

- name: bookings
...
measure: $amount
...

Multiple Dimensions

- name: average_sales_cycle_length
...
measure: $close_date - $created_date
...

Formula measure

In Formula metrics, the measure property is where the formula equation is defined, using component metrics and constants to calculate metric values. Common formula types:

  • Divide: Creating a Ratio metric by dividing two metric values.
  • Sum: Adding together multiple metric values.
  • Multiply: Multiplying metrics with other metrics or constants.
  • Custom: Combining metrics, constants, arithmetic, and SQL operations to create a unique equation.
tip

Ensure alignment of component metrics on the same x_axis to guarantee accurate period calculations in formula measure.

Examples

Dividing two metrics to create a average sales price metric:

- name: average_sales_price
entity: opportunity
formula: $metric__bookings / $metric__bookings_count

Wrapping Up

This documentation highlights the critical aspects of the 'measure' property in Sightfull metrics, emphasizing its application in both Aggregate and Formula metrics. For further exploration and understanding, users are encouraged to delve into related topics such as joins, x_axis configuration, and building your first metric in Sightfull.