Sturdy Reporting with Google Sheets Question Perform

As you’re employed with spreadsheets you decide up formulation, methods, and formatting classes to make reporting simpler. I usually see customers get caught relating to combining these items into an entire report.

ppc rocket takeoff

We just lately onboarded a consumer and wanted to copy certainly one of their previous studies. A lot of the report created manually, updating a row at a time, each day. This isn’t a sustainable follow and I can’t think about committing somebody to this course of.

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

Making the Most of Our Question()

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

We’ll primarily depend on the question operate, which could be the perfect purpose to make use of Google Sheets. In case you’d like one other tackle the subject, take a look at Briana Ogle’s publish, Google Sheets Question Perform Want-to-Is aware of For PPC

Working with dates

 With a view 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 accurately. We have to use the textual content() and date() features to insert a date in our question.  

google sheets query function date syntax

In case you do this and obtain a parse error, test your citation marks. Most points are attributable to a mix-up between the only and double-quotes. 

On this instance, we used the primary of July. It’s a month up to now report. In case you wished an all the time present month up to now report, you would add a dynamic vary. As an alternative of a static 7 for the month, you would substitute it with =month(at this time()). This returns the index of the present month and retains your date() operate present all 12 months.

If you should get extra artistic with your personal report take a look at all of the date features accessible in Google Sheets. 

Filler rows

 Typically you desire a column that merely acts as a label. On this instance, we want a platform identify. You may rapidly 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 simple to label sources to your knowledge or add additional info 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 let you know the place the quantity got here from however they aren’t readable. Alternatively, you should use labels to rename columns to extra acceptable phrases for your online business. Perhaps you name conversions transactions or perhaps Impressions are views. 

In case you have 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 are able to take away that with a label! 

Labels are created with a easy command on the finish of the question. All it’s important to do is put the present identify 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 identify of our filler column. 

Combining a number of queries

Now we’ve 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 broaden and would return an error. If we put numerous rows in between them, we would wish to revisit this doc to cover and broaden 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 shall be appended afterward. 

google sheets query function combing multiple queries

Row counts can nonetheless change between runs although. You might need to discover conditional formatting to use the wanted formatting to your tables. 


Now we’ve all our advert knowledge in a single desk nevertheless it’s a bit messy. It requires an excessive amount of psychological math to match combination efficiency throughout platforms. 

We are able to add complete 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 information with our month up to now queries. For consistency, you would use a question() for the whole lot however I desire single line returns.

google sheets query function adding subtotals

Seeing it All Come Collectively

As soon as we mix all these items, we’ve a brand new desk that robotically updates month up to now 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 guide strategy, we’ve saved a considerable amount of pivoting, summing, copying, pasting, and row modifying. As soon as the information updates, our report tables will robotically replace to regulate for marketing campaign modifications throughout platforms.

In case 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 nearly all of it carries over to Google Sheets as properly!

Leave a Reply

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