How to merge rows of data?

Hi all! I’m new to Looker and need some help. A search didn’t turn up anything or I’m searching for the wrong thing. 

I’m trying to merge two rows of data into a new row with a new name. i.e. in the example shown below, I want to merge the “line_copy” row with the “freeform” row into a new row called “Non-Catalog”. Likewise, I want to merge the “Punchout” row with the “Catalog” row into a new row called “Catalogs”. Any guidance would be much appreciated!!

34902c41-55bb-4520-8490-664f9b6e568e.jpg
0 2 3,292
2 REPLIES 2

If you only have those form and no way to group them by other dimension, then you need to create a Custom Dimension with the rules you have mentioned.

if(${orders.orders_source} = "line_copy" OR ${orders.orders_source} = "freeform", "Non-Catalog", "Catalogs")

Then you use this Dimension as the only one you have and the other measures, as long as they have the right type, will aggregate.

You can adjust such if statement to suit your needs. Perhaps you oly have 2 non-catalogs and you know the rest will be catalogues, then the code above will suffice. But if it’s the other way around you may need to use the names of catalogues

Brilliant! That worked. Thanks so much!

Top Labels in this Space