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 :

Expected visualization (Bar Chart + Google Analytics goals)

Expected visualization (Bar Chart + Google Analytics goals)

Easy right?

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 :

Goals bar chart with device category as a dimension with Google Data Studio

Goals bar chart with device category as a dimension

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 :

Goals bar chart with Desktop Dimension - Google Data Studio

Goals bar chart with showing Desktop – Google Data Studio

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?

The Solution

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:

Bar chart goals for all device category

Bar chart goals for all device category

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.

Related Articles

A beginner’s guide to Google Data Studio blending

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…

Bend data studio to your will with “photoshop” layers or How to freeze Table rows

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…

How to transfer google data studio ownership

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…


  1. Jessica on December 4, 2019 at 8:11 am

    I’m getting an error message: “Syntax error: Illegal input character. Check that your formula does not contain smart quotes.”

    • Simon Breton on December 4, 2019 at 10:59 am

      Hi Jessica. Thanks a lot for the feedback. I wanted to correct this for a while now. I’ve updated the formula with a proper code embed. It should be working now. Let me know if you need any helps.

Leave a Comment