Internet Marketing

Strong Reporting with Google Sheets Question Operate

As you’re employed with spreadsheets you decide up formulation, methods, and formatting classes to make reporting simpler. I typically see customers get caught in the case of combining these items into a whole report.

ppc rocket takeoff

We not too long ago onboarded a consumer and wanted to duplicate considered one of their previous reviews. Many of the report created manually, updating a row at a time, each day. This isn’t a sustainable apply and I can’t think about committing somebody to this course of.

On this article, we’ll work via a couple of examples from this report. Every step will help in automating your individual advanced report and creating dynamic tables to avoid wasting your time and sanity.

Making the Most of Our Question()

Let’s dive in! This submit will particularly concentrate on making a dynamic desk. The information desk will regulate to modifications in campaigns, dates, cleans up the column names and calculates subtotals for every part. 

We’ll primarily depend on the question perform, which could be the very best cause to make use of Google Sheets. When you’d like one other tackle the subject, take a look at Briana Ogle’s submit, Google Sheets Question Operate Want-to-Is aware of For PPC

Working with dates

 With the intention to filter by dates, we’ll want to change our SELECT. Queries use textual content arguments so we will’t throw a plain date in there and count on it to be interpreted appropriately. We have to use the textual content() and date() features to insert a date in our question.  

google sheets query function date syntax

When you do that and obtain a parse error, examine your citation marks. Most points are brought on by a mix-up between the one and double-quotes. 

On this instance, we used the primary of July. It’s a month to this point report. When you wished an at all times present month to this point report, you could possibly add a dynamic vary. As an alternative of a static 7 for the month, you could possibly exchange it with =month(immediately()). This returns the index of the present month and retains your date() perform present all 12 months.

If you might want to get extra inventive with your individual report take a look at all of the date features obtainable in Google Sheets. 

Filler rows

 Typically you desire a column that merely acts as a label. On this instance, we’d like a platform title. You may shortly add this to any question by including the worth in your “Choose “. Inserting the specified textual content is the equal of setting all rows within the column equal to that worth. 

google sheets query function inserting a label

This makes it straightforward to label sources to your knowledge or add further data to the outcomes for assist with future filters or evaluation.  

google sheets query function label result


Labels clear up your queries by customizing column names. By default the question will return sum(Clicks), sum(Conversions), sum(Conversions/Income).

These inform you the place the quantity got here from however they aren’t readable. Alternatively, you need to use labels to rename columns to extra applicable phrases for your online business. Perhaps you name conversions transactions or possibly Impressions are views. 

When you had been taking note of the final screenshot you’ll discover that our first column is labeled “BING” which was our filler worth for the primary column. We will take away that with a label! 

Labels are created with a easy command on the finish of the question. All it’s a must to do is put the present title and what you’d like to interchange it with.

google sheets query function adding labels

Within the instance above we changed the names of all our calculated columns and changed the title of our filler column. 

Combining a number of queries

Now we have now our knowledge and labels arrange for Bing. We nonetheless want Google too. We may place one other question under our Bing question however that will get messy. If the variety of rows modifications the question may not have room to develop and would return an error. If we put a lot of rows in between them, we would wish to revisit this doc to cover and develop rows as wanted. 

You may run a number of queries collectively by wrapping them in curly brackets and separating them with semi-colons.

This runs every formulation sequentially. Regardless of what number of rows are returned by the formulation the following formulation might be appended afterward. 

google sheets query function combing multiple queries

Row counts can nonetheless change between runs although. It’s possible you’ll wish to discover conditional formatting to use the wanted formatting to your tables. 


Now we have now all our advert knowledge in a single desk but it surely’s somewhat messy. It requires an excessive amount of psychological math to match mixture efficiency throughout platforms. 

We will add whole and subtotal rows between queries. As an alternative of a question(), we will insert the opposite formulation we’d like to make use of. On this instance, we use a mixture of sumifs() to line up the info with our month to this point queries. For consistency, you could possibly use a question() for every little thing however I choose single line returns.

google sheets query function adding subtotals

Seeing it All Come Collectively

As soon as we mix all these items, we have now a brand new desk that mechanically updates month to this point numbers and shows them in a dynamic desk.

google sheets query function combining features for a dynamic tablegoogle sheets query function table result

In comparison with a extra handbook method, we’ve saved a considerable amount of pivoting, summing, copying, pasting, and row enhancing. As soon as the info updates, our report tables will mechanically replace to regulate for marketing campaign modifications throughout platforms.

When you’d like to extend your spreadsheet expertise additional. Take a look at The Full Information to Excel for PPC. It’s primarily based on Excel however virtually all of it carries over to Google Sheets as properly!

Supply hyperlink

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Adblock Detected

Please consider supporting us by disabling your ad blocker
%d bloggers like this: