Grouping countries by term in Data Studio?

Now that we can sort by country data anymore due to ios 14, I was wondering if anyone has found a work around? 


I was thinking it would be possible if we could group by campaign names


For example:

(JP)(AW)

(JP)(RE)

(JP)(Traffic)

(US)(AW)

(US)(RE)

(US)(Traffic)


The Idea would be that you could have a filter, maybe using if statements? saying if JP/US in campaign name, then group together?


So the result would be all three campaigns' data combined to view altogether to get a better big picture. 

So It would go from viewing six campaigns, down to two entries

(JP)

(US)


If anyone has any ideas or tips I would really love to hear them!

  • Hi Henry,


    Thanks for reaching out! From your description, it seems like a CASE statement in Data Studio could do the trick. You can find the full instructions here but below is an example of how that would look if you have campaigns named as countries:


    CASE
    WHEN Campaign Name IN ("USA","Canada","Mexico") THEN "North America"
    WHEN Campaign Name IN ("England","France") THEN "Europe"
    ELSE "Other" 
    END


    I hope this answers your question! 


    Best,

    Menno

    Supermetrics

  • HI Menno! Thanks for the reply!

    I have tried that and seem to be in the right direction, however I want the output in the table to be to be the following (based on the example you gave), so they are all grouped. Right now for each campaign that matches, it just also has an extra field with whatever label it has. I would like to add all campaigns together with the same label, and view as on in a table.  


    I want this output:

    North America

    Europe


    I get this output using the example:

    North America

    North America

    North America

    Europe

    Europe

    Europe


    This is because I have 6 campaigns 3 of each fitting the code set. 


    I hope I am explaining it well! 


  • Hi Henry,


    Happy to help! Our limitation here is only that calculated fields like the CASE statement is a feature that belongs to Data Studio and not Supermetrics, as we only supply the data. We therefore don't have as much expertise over it as you can find from Data Studio itself. Hopefully here you can find the answer you're looking for!


    I wish I could be of more assistance but I hope this helps!


    Best,

    Menno

Login to post a comment