How to mix GA4 metrics and dimensions in Looker Studio? (Danger Zone!)
Want to mix GA4 metrics and dimensions in Looker Studio but the native connector won’t let you? Well, we’ve got a little hack for you !
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!).
Top Looker Studio connectors we love and use on a daily basis (all with free trials): PMA - Windsor - Supermetrics - Catchr - Funnel - Dataslayer. Reviews here and there.
Not sure which one to pick? Have a question? Need a pro to get a project done? Contact us on LinkedIn or by e-mail, and we’ll clear up any doubt you might have.
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:
CASE
WHEN Page title=’Flood-It!’ THEN Views
ELSE 0
END
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.
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:
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.
PROBLEM SOLVED !
Top Looker Studio connectors we love and use on a daily basis (all with free trials): PMA - Windsor - Supermetrics - Catchr - Funnel - Dataslayer. Reviews here and there.
Not sure which one to pick? Have a question? Need a pro to get a project done? Contact us on LinkedIn or by e-mail, and we’ll clear up any doubt you might have.
Communicate and browse privately. Check Proton Mail and Proton VPN
Website hosted by Tropical Server



