How to mix GA4 metrics and dimensions in Looker Studio? (Danger Zone!)

Before any misunderstanding... If you are to work with GA4 data in Looker Studio (formerly known as Data Studio), our recommendation will always be to do it through Big Query (for numerous reasons we won't list here). But, acknowledging the fact that not everyone is proficient in writing SQL queries, we've decided to write this short article on how to mix GA4 metrics and dimensions in Looker Studio (Danger Zone, there are still some limitations here!).

This little hack will give you more options on what you can display in your reports. It's not THE silver bullet, but it can help here and there on certain dataviz. With no further delay, let's review together how you can do that (spoiler: it has to do with Extract Data!).

Need help ? We offer Looker Studio Support for companies.

Looking for a connector ? Check Supermetrics.

Try to mix metrics and dimensions with the native GA4 connector... and fail!

Let's say you want to show the Views only for certain Page Title, whilst still showing another metrics for all Page Title. This is tricky, because you can't use a filter here (if you were to do so, all metrics would be filtered).

You could try the following formula:


WHEN Page title='Flood-It!' THEN Views 



But unfortunately, you'd get the following error message: Sorry, calculated fields can't mix metrics (aggregated values) and dimensions (non-aggregated values). Please check the aggregation types of the fields used in this formula. Learn more.

looker studio bible mix GA4 metrics and dimension error message sorry

Use Extract Data, and let the magic happen!

In order to overcome this limitation, we are going to create a new Extract Data data source.

Select the metrics and dimensions you want to mix, set Auto update if necessary, and you're good to go:

looker studio bible mix GA4 metrics and dimension extract data

It comes with some limitations though. if you were to drop some more dimensions in, you could see some funky results (such as, rows repeating themselves...).

As mentioned earlier, it's not THE silver bullet, but it's a little hack that is good to know to be able to produce specific dataviz here and there.

Test the calculated field on your new data source, and it works

Now, replace your GA4 native data source with the Extract data one, and rewrite the formula: no error message, it just works, you will only get the Views for the Page Title you've filtered on:

In this short article, we've reviewed how to mix GA4 metrics and dimensions in Looker Studio. Remember that there are some limitations, and if you are to throw in more dimensions, you might get kinky results.


Previous article: How to build a stocks portfolio tracker in Looker Studio using Sheets and Big Query?

Next article: How to make the best use of publishing and versioning in Looker Studio?

Looking for something else? All our articles can be found on our blog page