Metrics in Pliable represent calculated values derived from entity data, serving as the quantitative backbone of your reports and analysis. They are typically created by applying aggregation functions, such as SUM, COUNT DISTINCT, or AVERAGE, to a column within an entity. For instance, the SUM of the “Revenue” column in the Orders entity provides total revenue, while the COUNT of distinct “Email” values in the Customers entity represents the total customer count.

Metrics can also combine these base calculations, such as dividing total revenue by total customers to derive "Revenue per Customer." This close connection to entities ensures metrics are grounded in the business context, enabling accurate and actionable insights.

Creating Metrics

Metrics can be created in the Semantic Layer.

Metric Configuration

Metrics can either be simple metrics, which are an aggregation of a column on an entity (such as “Total Revenue” being the SUM of the “Revenue” column on the “Orders” entity), or complex metrics, which are mathematical formulas applied to one or more simple metrics (for example, “Revenue per Customer” being equal to “Total Revenue” divided by “Total Customers”.

To create a simple metric, simply draw a connection from an entity to that metric in the Semantic Layer. You can click on the metric to choose the column and aggregation method:

In this case we are counting the distinct values in “Pliable Record ID” from the Customers entity.

In this case we are counting the distinct values in “Pliable Record ID” from the Customers entity.

To create a complex metric, connect two or more metrics together. You can click on the metric to write the formula to be used for calculation:

Here we are accounting for edge cases where “Total Customers” is 0, using Snowflake’s DIV0 method instead of simple division.

Here we are accounting for edge cases where “Total Customers” is 0, using Snowflake’s DIV0 method instead of simple division.

Metric Filters

Often times you will only want to include certain records in the calculation of a metric. For example, if you have a metric called “Total Canceled Orders”, you’ll want to count the number of distinct orders where STATUS is equal to “Canceled”. For this

image.png