Dimensions
Dimensions define the characteristics and features of the entities in your ontology. They are the essential labels that give meaning to the columns in raw data tables, and play a critical role in making your data more meaningful.
Getting started
To create or edit dimensions, navigate to the ontology page and choose the desired entity. Now, on the right panel, click on the desired dimension to edit it or use the +
button to create new ones. Creating or editing a dimension requires the following inputs:

-
Name - The unique and descriptive name of the dimension.
-
Formula - List of possible source dimensions or calculations that define the logic of the dimension.
-
Type - The data type of the field, including string, number, boolean, timestamp and timestampz.
-
Description (optional) - A description of the dimension.
How are dimensions defined?
Dimensions are defined by mapping their sources and any fallbacks where necessary, using the Formula field. The Formula property of each dimension contains a list of equations, where the first item determines primary source and all subsequent items are fallbacks to use when preceding items are not available (null value).
The image above is an example of the "Contract Length" dimension. In this example, the primary source is the source dimension named $src__contract_length
, and if that source is not available (i.e. null value) - then the dimension will fallback to the 12 constant.
For more complex logic and calculations, you can use equations. Equations can leverage query syntax freely, including arithmetic and logical operations, aggregations as well as direct references to other fields and dimensions. This type of dimensions is ideal for scenarios where you need to create complicated custom dimensions that require complex operations. For example:
$amount * $src__probability
(CASE WHEN $is_won = true THEN $amount ELSE 0 END)
(sum($orders.amount) / count($orders.src__id))
Advanced mode
For users comfortable with technical syntax, the Advanced mode allows you to create and edit dimensions directly in SQL using our Semantic Layer syntax. Toggle the "Advanced" option to enable this feature. This mode is beneficial for those who prefer working in a pure SQL environment and provides additional flexibility.
For more information on editing dimensions using SQL, check out the dimensions documentation.