AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Data Studio
2.3K members online now
2.3K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

How to Plot Multiple Custom Dimensions as Rows

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Let's say I've built 10 custom dimensions to group multiple 'source/mediums' using the following CASE formulas: 

 

Custom Dimension 1: CASE WHEN Source Medium IN ("example source / example medium") THEN "Custom Dimension 1" ELSE "Oops" END

Custom Dimension 2: CASE WHEN Source Medium IN ("example source / example medium") THEN "Custom Dimension 2" ELSE "Oops" END

Custom Dimension 3: etc, etc

 

Currently, I can create a table for each dimension in Data Studio and it looks great. However, is there a way to plot multiple dimensions as rows within a single table? 

 

 

To accomplish this,  I've tried to group each dimension under a single custom dimension using the following CASE formula so that it would force each dimension as a row: 

 

Group Multiple Dimensions: 

 

CASE

WHEN Custom Dimension 1 IN ("Custom Dimension 1") THEN "Custom Dimension 1"

WHEN Custom Dimension 2 IN ("Custom Dimension 2") THEN "Custom Dimension 2"

ELSE "Oops"

END

 

The formula had no errors, but when I looked at the table, it only showed Custom Dimension 1 as a row and not Custom Dimension 2. Was there something wrong with my formula? Is this even possible to do? 

 

The data source is the same, metrics are also the same for each dimension. 

 

Thanks! 

 

How to Plot Multiple Custom Dimensions as Rows

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Hey Matt,

 

If I am understanding you correctly, you should just combine all your custom dimensions in one custom dimension formula like you did at the end.

 

In Stead of

 

Custom Dimension 3

 

CASE

WHEN Custom Dimension 1 IN ("Custom Dimension 1") THEN "Custom Dimension 1"

WHEN Custom Dimension 2 IN ("Custom Dimension 2") THEN "Custom Dimension 2"

ELSE "Oops"

END

 

Do This

 

Custom Dimension 1

 

CASE

WHEN Source Medium IN ("example source / example medium") THEN "Dimension a" WHEN Source Medium IN ("example source / example medium") THEN "Dimension b"

ELSE "Error"

END

 

I would also suggest regexp_match as it is more flexible