The differences between metrics and dimensions in Google Data Studio can be intimidating at first, but once you wrap your head around it they are actually pretty simple and easy to work with. In today’s article, I am going to fully explain what dimensions are and how you can get the most of them when using Google Data Studio. Here we go!
What Are the Differences Between Metrics and Dimensions in Google Data Studio?
Metrics and dimensions are both fields from your data source. You can visually tell if a field is a metric or dimension because dimensions are highlighted in green, while metrics are in blue. Google has stuck with this color-coding for years, which is a nice bit of stability for an online app that has changed considerably over the years.
Put simply, metrics are numbers while dimensions are descriptions or categorical information. Before going further, let’s consider an example to drive home the differences between metrics and dimensions.
Let’s pretend we have a spreadsheet of our 5 top sales employees of the month. We have columns with 5 rows of data for:
- Employee Name (this is a description of the data, so it is a dimension. The data type is text.)
- Branch Location (this is also a description of the data, so it is also a dimension. The data type is text.)
- Number of Sales (this is a number, so it is a metric. The data type is number.)
- Average Sales Amount (calculated as a formula using another data source. This is a number, so it is a metric. The data type is currency.)
- Percentage of Sales Refunded (calculated as a formula using another data source. This is a number, so it is a metric. The data type is percent.)
What Makes Data a Metric?
A metric in Google Data Studio is always a numeric value that can be aggregated. A purely numeric value will always be a metric in Data Studio, so this includes data pulled directly from your data sources as well as calculated fields. They are generally represented as:
- A number
- a percentage or
- a duration (in seconds, etc.)
- a currency value amount.
What Makes Data a Dimension?
A dimension is more of a descriptive quality than an easily quantifiable number. You use dimensions to categorize or describes your metrics. Dimensions cannot use aggregation, which makes sense, because dimensions are not numeric values, so you can’t just add them all up or find the averages within the data.
The exception to this rule is that you can create a metric from the unique number of values in a given dimension. If you can modify your data source then there are multiple ways to actually get some metrics from your dimensions. For instance, if your data source is a database or a spreadsheet, then you could create a new field that calculates the count or unique value count of one or more of your dimensions. I will cover this topic in depth below.
How To Work With Dimension in Google Data Studio
When you select a data source, whether it’s a spreadsheet or a connection to your Google Analytics, the data source itself will determine whether or not Google Data Studio recognizes each field as a dimension or metric. You can manually tell Data Studio to convert a field from one data type to another, but dimensions will stay as dimensions unless you alter the data source to return numeric values or you force the dimension to become a metric. In that case, you can get a distinct count of all unique values from your dimension as a metric.
If you have the ability to alter your data source then you have maximum flexibility for working with data. However, even if you’re using a data source outside of your control, there are still a lot of things you can do with the data inside of Data Studio itself. For instance, you can:
- Manually change the data type.
- Create calculated metrics and dimensions.
- Change the default aggregation method to change how a metric is summarized.
- disable, copy, or delete metrics or dimensions that you don’t want to work with.
Working With Metrics and Dimensions
Metrics are the actual measurement amounts that are compared on a chart, while dimensions are used to group your data. The more dimensions you use on a chart, the more granular the details are, or in other words, the more dimensions you use, the deeper you drill down into specific segments of your data.
For example, let’s say you have the same data source from our last example, the spreadsheet of the top 5 sales employees of the month. If you had a chart with 1 metric (number of sales) and 1 dimension (employee name) then you would have a very simple chart that shows the number of sales for each of the 5 employees. To continue the example, let’s add a 2nd dimension: branch location. Now we have a more complicated chart because first it still breaks down the number of sales by employee, but then it also breaks down the number of sales by branch location.
So remember, metrics are measured, while dimensions can group together or describe those metrics in a meaningful way. The fewer dimensions that you use, the more broad the data is. The specificity increases each time you add another dimension to your charts. There is definitely a limit to how many useful dimensions you can add to one chart, although the exact amount will vary from data source to data source.
Creating Calculated Dimensions
Calculated fields allow you to take existing data, run it through some actions or operations to produce new values, and then use this data as a new field in your charts. You can do math operations, change text, date, or geographical data or even use complex logic to produce fine-grained results. Calculated fields can be numeric values (calculated metrics) or descriptive values (calculated dimensions.) You can identify “chart-specific” calculated fields in Data Studio because they have an “fx” symbol next to them in the data source editor.
When you have the ability to modify your data source, it is easy to add new metrics that are calculated from metrics or dimensions. It is also preferable to create calculated fields directly in your data source so that any chart you create from that data source can take advantage of it. However, if you’re unable to modify your data source, you can still create calculated dimensions that are “chart-specific” only. That is to say, the field will only be available in the chart you created it in.
To create your own calculated field, the setting “Field Editing in Reports” needs to be enabled in the data source. In addition, these calculated fields will be unable to use other calculated fields but instead must reference actual fields from the data source directly. The one exclusive benefit of chart-specific calculated fields is that you are able to work with blended data, which is impossible when creating data-source calculated fields.
When you create a chart-specific calculated field, you can choose from any data type. However, you will need to select fields and perform operations that appropriate to the data-type. For instance, if you create a new calculated-field that does some math using a few metrics, then the data type of all the fields involved would be number. However, it is possible to create advanced formulas that programmatically change data types, allowing you to convert dimensions into metrics and vice versa. This level of formula creation is essentially computer programming, so anyone with a programming background should have no problems converting data-types using formulas. If that whole paragraph sounds foreign to you, don’t worry. Any introductory course on programming will give you most of the tools you need to start writing advanced Data Studio formulas.
Using a Dimension As a Metric
Obviously most dimensions are non-numeric and so, therefore, are not metrics. However, you can still use a dimension as a metric if you have it set to aggregate the distinct value count of your dimension field. While I have already covered this a bit, if you’re curious about how to actually perform this operation, simply find your field in the data source editor and click the edit pencil icon to change the data type to your new data-type. Since data-type determines whether something is a dimension or a metric, changing the data-type of a field is also what changes it to and from a dimension and a metric.
Google Data Studio has its own distinct terms and definitions which can be confusing to a new user. However, taking the time to learn and explore these concepts should help to demystify Data Studio. The word “dimension” for me means a lot of things, most of which are complicated. If Google had called them “describers” or “descriptors” instead, I think a lot of people would instantly understand them with less research.
Despite how simple dimensions are in Google Data Studio, there is no denying the incredible complexity and analytical details that you can extract from their use in your charts. At the end of the day, if you’re creating charts, there is very little way you’re not going to be working with dimensions. Hopefully, this article has helped shed light on them, so that you can more effectively use them in your data science adventures!
I love Google Data Studio and this site is all about sharing tips and trick and help users get the most of out Google’s free data visualization tool