Dimensions
Dive into how to handles data categorization through Dimensions.
To connect to a database other than Google Analytics you will need an
enterprise plan.
Contact sales
What are Dimensions?
Dimensions offer a way to group or filter data based on categories or timeframes. Think of them as special labels that simplify data organization and analysis. In the realm of data platforms, they form a part of the larger structure known as a semantic model, created alongside identifiers and measures.
In SQL, dimensions typically align with the group by
clause of your SQL query.
How to Define Dimensions
Every dimension necessitates a name, a type, and sometimes, an expression parameter. Below is a breakdown of these parameters:
Name
The visible name of the dimension. It can also act as an alias if there’s a discrepancy between the column name or SQL query reference and what’s provided in the expression.
Type
This determines the kind of group in the semantic model. The types are: Categorical and Time.
Time granularity
Time dimensions are used to group metrics by different levels of time, such as day, week, month, quarter, and year.
Description (optional)
Provides a detailed explanation of the dimension.
Expression (optional)
Indicates the underlying column or SQL query for the dimension. By default, we will use the column name if expr isn’t provided.
How to create and edit a dimension
In the Catalog section click click on a table you want to set up a dimension for. Then click on the Dimensions
tab.
Specification for Dimensions
Dimensions are logically defined using the following parameters:
For instance, consider a semantic model detailing transactions:
Types of Dimensions
We supports two primary types of dimensions: Categorical and Time.
Categorical dimensions facilitate grouping metrics by categories, like product type or geographical region. They can reference existing columns or be derived from SQL expressions.
Example:
Wrapping Up
Dimensions play a pivotal role in organizing, filtering, and analyzing your data. By mastering the use of dimensions, you can create more meaningful and insightful data models.