Displaying data by numeric range: Example

Modelled data sources are the foundation on which metrics are built. Modelling enables you to interpret information in numerous ways, controlling the shape, format, and granularity of your data. Learn more about modelled data sources here.

This article tells you how, by adding a column to a modelled data source, you can segment your metric numeric data by ranges. (When you’re creating metric(s), you will select your added column as a segment.)

The method described here can also be used with other types of data, for example:

  • Age groupings for demographic data
  • Numeric ranges, such as revenue categories

Our example begins with a raw data source that includes various information, such as the chat date and the agents who handled the chats. It also includes online chat duration, in seconds (as shown below):

We want to divide chat durations into two categories: “In Duration Limit” and “Over Duration Limit”.

To create the segment we want to visualize in our metric, we add a column to the modelled data source and insert the following formula:

For each chat in our data, the formula checks the chat duration and, if it’s in range, it returns the value “In Duration Limit“, otherwise it returns the value “Over Duration Limit“.

Creating a custom metric that displays this data

When creating our metric, we will use a count of one of the columns in the model and the chat date as the date value. Learn more about creating metrics here.

We need to remember to choose our new column as a segment so we can visualize it in our metric.

See our final metric below:

 

Have more questions? Submit a request