Intro to Parameters. Part 1

Intro to Parameters. Part 1

Looker Studio parameters are custom variables created by users that allow them to create reports best suited to their needs. They allow us to interact with user-provided data so that every user in a view mode can input their own data and see the calculations. Let me explain to you how it works on the example of my Looker dashboard.

There is a video tutorial where I review this Looker dashboard and explain everything that is said below.

Creating parameters in Looker

In the Edit data source menu I add a parameter. I name it Daily Google Budget. Date type in our case is a number, we can select a decimal number. As a default value let’s select 400. You can select a data range of expected Daily Google Budget. If the actual daily budget is more than 400, the calculation will be wrong. 

After saving this parameter, I add another one, exactly the same but I name it Daily Bing Budget.  

Then I go to all Fields. If I scroll down, I can see the list of our parameters. We have Google budget, Bing budget that I’ve set up previously, and Daily budgets we’ve added right now. I can click “Finish” and let’s check what we have. 

Now we can add control and our blank input box. In this field we can input the numbers. We add two input boxes – one for Google and one for Bing. 

Therefore, if we don’t have a table, the added parameters make no sense. 

Creating a table and calculated fields in your Looker dashboard

Basic settings for the table are: 

Dimension: Add Platform

Metric: Cost

By default metric is shown by summary cost, but I change it to the average summary cost.

As we can see, we don’t have daily metrics so for parameters we can add only two control fields and we cannot add it directly to our table. How can we work with this? 

I go back to the data source, edit it and I need to add a field. The field name will be Daily budget and here we will write a formula: 

AVG(CASE WHEN Ads platform = Google Ads THEN  Daily Google Budget 

WHEN Ads platform = Bing THEN Daily Bing Budget 

ELSE 0

END)

After saving the formula, I change its format from number to currency. Now we can add the metric to the formula. When we change, for example, Bing daily budget for 350, we can see 350 here. 

Now we want to see the percentage of the budget used. How to do it? 

Similarly, we need to create calculated fields, we can do it here: scroll down in our data source and we can see Add a field here. Name it % of daily budget used. 

The formula looks like this: 

AVG Cost / Daily budget

Further, I change the format of the field to percentage. Now when we change the number to, for example, 450, we can see that we spent 227 but we had 450 and we used 94% of the budget. If we change Bing for 450 as well, you can see that we spent 83 % of the budget that we had. Perfect, it works already! 

The same we can calculate with the rest of the budget. Likewise, we can add a new formula Rest of Daily Budget that looks like this:

Daily budget – AVG Cost

Consequently, we change the format of the field to euro. 

To sum up, you have already learned how to set up the parameters. In the next part of Intro to Parameters (this article on Medium) I will tell you more about how you can fix the inaccurate data in the Summary row and correct all numbers for all the platforms basing on the same Looker dashboard. Hope you enjoyed the article! Leave your questions in the comments section!