Understanding what you want to create
Metrics: Metrics are the numbers you want to measure e.g. Total Sales ($)
or Total New Customers
. You can create new metrics by combining existing metrics into an equation e.g. (Clicked Emails / Delivered Emails) * 100 = Email Click-Through Rate
Dimensions: Dimensions are fields in your data set that you can use to slice your metrics. As an example, you may want to slice your Total Sales ($)
metric by Country
, Product
or Lead Source
to understand sales performance by vertical or channel better. Preql also allows you to create custom dimensions and groupings so you can, for example, bundle all European countries into a single category called EMEA
Creating a new definition
Go to "Definitions" from the left side navigation, click on the "Create new" dropdown and select which item you want to create. A side drawer will open where you can start building your logic.
Creating a metric
In the main input field, you can use your keyboard to build expressions combining existing metrics and leveraging any of the available operators, such as ( ) * / + -
. From there, you’ll have the option to apply additional logic as needed, such as filters or conditional logic.
Once you start making an equation, your options will be limited to what other metrics you can combine. In most cases, this is restricted to other metrics that come from the same data source. If you want to compare metrics across data sources, create a report or reach out to the Preql team for support.
If you make a mistake, you can select items and use the backspace on your keyboard, or you can start again by hitting the clear button in the calculator.
Using the calculator and finder
If you’re not sure which existing metrics you want to use to build your logic, you can use the finder window below the main input field to search and explore the data available to you.
Click on the calculator icon to access a full calculator and extra options for deleting and clearing your work.
Adding filters
Add filters to your metric to further refine your definition, e.g. add a filter to focus in on a single marketing campaign.
Saving your new metric
Before you save your new metric, add a name and description. You can preview your data by hitting ‘load preview’ or ‘refresh’ in the data preview section
Creating a dimension
Start by picking an existing dimension you’d like to recategorize or build logic off of. For example, Account Country
or Opportunity Created At
Step 1 - Build your logic
You’ll then be asked to provide extra information on the category or logic you’re building, for example:
If you select a dimension made up of words e.g.
Lead Country
, you’ll select multiple items to include in your category e.g.America
andCanada
If you select a dimension made up of numbers e.g.
Account Age
, you can add rules e.g.greater than 12 months
If you select a dimension made up of dates e.g.
Lead Converted Date
, you’ll need to select a condition e.g.Date is after
and then you’ll either select another date dimension or using a date picker with e.g.Lead Created Date
orJanuary 1st 2025
Creating complex logic
If you want to create more complicated logic, you can click on ‘add more logic’ and build extra layers with AND
s and OR
s.
Step 2 - Label your new category
After you’ve created your logic, you’ll then need to name your new category. These are what will display as the items in your new dimension. You can either type in a name and select ‘label as’ in the dropdown e.g. Label as ‘North America’
or you can select another dimension from the dropdown to display if the above logic is true.
In some occasions, you may want to select a column to reference instead of labeling your new category - this allows you to pull through items from the same or another dimension instead of showing a new category label in your data.
Step 3 - Create multiple categories
Continue adding new
Step 4 - Uncategorized items
Once you've created all your categories, Preql automatically labels all of your uncategorized data as 'uncategorized'. You may want to rename this e.g. Rest of World
or select another column to to reference
Saving your new definition
Before you save, we provide a data preview so you can sense-check if your logic feels right. After hitting save, your newly created definition will open in the side drawer.
Your definition will automatically be added to the main unsorted list. If you’re within a collection and create a new definition from there, it will automatically be added to that collection.