How to create a bar chart in Google Data Studio without dimensions… the case of Google Analytics Goals.
Google Data Studio is a great tool however some limitation can be incredibly frustrating. Things can get quickly complicated even for what it seems to be a most straightforward, apparent request.
I recently found myself in a situation where a client wanted to have Google Analytics goals displayed in a simple bar chart using Google Data Studio. My client wanted something like this :
The problem with Google Data Studio when building a bar chart with Google Analytics goals.
Google Data Studio doesn’t let you create a bar chart without applying at least one dimension. Why is this a problem? Because in Google Data Studio, a Google Analytics Goal is a metric, not a dimension. Therefore if you are trying to visualise your Google Analytics Goal with a bar chart, you will probably end up with something like this :
In this example, I’ve applied the “device category” dimension to our bar chart. It’s pretty unreadable. We could simplify this bar chart by applying a filter on the “device category” dimension. By filtering tablet and mobile devices, we have the following result :
It’s visually similar to our initial requirement, but still, we only have desktop goal displayed here. So how do we proceed if we want the same result but with all goals across all devices category?
To solve this problem, we need to create a “dummy dimension”. A dummy dimension is a wild card. It answer “yes” to every situation. In this situation, we need a dimension which aggregates all the goals into one bucket independently of the multiple device categories we may have. How do we do this? By creating a new calculated field using the following formula :
CASE WHEN REGEXP_MATCH(Device Category, '.*') THEN 'Goals' END
This formula aggregates each goal of each device category in the same bucket ( ‘.*’ is our wild card here). When applying this new calculated field as a dimension, we finally get the expected results:
Does this article help you to solve an issue? If yes please share your experience in the comment section. If you need help with Google Data Studio, Don’t hesitate to reach me directly with your question.
As compared to tools like Tableau or Looker, Google Data Studio is pretty simple. However, for a lot of users, it will be their first confrontation with data manipulations like…
Here is a short article on how to freeze top rows in Google Data Studio with Tables. The fix itself might be quickly outdated but the solution is interesting as…
Transferring Google Data Studio ownership is not as straightforward as it should. Firstly it is essential to understand that transferring ownership of a report is not the same as transferring…