Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Drop down menu that populates data based on campaign selection

I need to create a drop down menu that basically allows me to select a campaign from a google sheet connector and have several data fields populate:

IE I select "Campaign 1", and the following data populates:
Static Image Impressions
Static Image Clicks
Static Image Spent

Text Ad Impressions
Text Ad Clicks
Text Ad Spent

Dynamic Ad Impressions
Dynamic Ad Clicks
Dynamic Ad Spent

My google sheet has all that data already, in individual columns, as shown below, but I can't quite figure out how to get the data to populate like I have listed above. I'm guessing I need to create some new fields that basically says "IF campaign matches x, then show static image impressions from column "campaign x static image impressions"

Screen Shot 2023-01-29 at 7.58.43 PM.png

0 1 144
1 REPLY 1

Yes, that's correct. You can use a formula to populate the fields with the data from the Google Sheet.

For example, to populate the Static Image Impressions field, you can use the following formula:

=IF(Campaign = "Campaign 1", Static_Image_Impressions, "")

This formula will return "" if the Campaign field is not "Campaign 1", and the Static_Image_Impressions value from the Google Sheet if the Campaign field is "Campaign 1".

You can use the same formula to populate the other fields.

Here is an example of how the formula would work in a Google Sheet:

Campaign Static Image Impressions Text Ad Impressions Dynamic Ad Impressions
Campaign 1 1000 2000 3000
Campaign 2 2000 3000 4000
Campaign 3 3000 4000 5000

In the Static Image Impressions field, the formula would return 1000 for Campaign 1, 2000 for Campaign 2, and 3000 for Campaign 3.

In the Text Ad Impressions field, the formula would return 2000 for Campaign 1, 3000 for Campaign 2, and 4000 for Campaign 3.

And so on.