How to filter, sort, and run calculations in Looker Studio

Are you trying to use the filters in Looker Studio and you're not able to find them?

Filters are a bit more hidden in Looker Studio than in Google Sheets.
With filtering options, you can add custom rules to show only the information you want to see.

In this article, you will find out where to find them and how to add them to your report in order to have much more detailed information according to your preferences. Also, we will tell you where to find the sort option to order your data in ascending or descending and explains to you the versatility of Looker Studio by running calculations.

Learn more about filters in this FAQ.

Keep in mind that Dataslayer only provides connectors, which are available within Looker Studio. We cannot add, improve, or change anything about Looker or its usability. Please contact Google support if you have any complaints or suggestions about Looker Studio.

Where to find filters and sort options

Filters

You will find the filters at the end of the Setup section of the chart you have selected.

You can also filter your report by adding controls to it. To learn more about controls read this FAQ.

Browser template (4)-Jun-06-2024-08-32-27-1084-AM

Sort

You can also filter by sorting a metric or dimension of your preference in ascending or descending.

The metric or dimension you want to sort has to be on the chart you selected.

Browser template (6)-Jun-06-2024-08-45-13-9428-AM

How to add a filter

Now that you know where to find the filter it's time to add one to your chart.

1. Select the chart you want to filter.

2. Click on Add a filter in the Setup section.

Browser template (10)-2

3. You can name the filter as you want.
Browser template (8)-Jun-06-2024-08-52-23-8119-AM

4. Select to include or exclude the data you are filtering.
  • In this example, we want to exclude the data.

Browser template-Jun-06-2024-09-18-17-1323-AM

5. Select the metric or dimension you want to filter.
Browser template (1)-Jun-06-2024-09-26-20-3446-AM

6. After that, you can select the condition.
  • In this example, we selected Less than.

These conditions will change depending on the metric or dimension you have selected to filter. Learn more about filters and their conditions in this FAQ.

Browser template (2)-Jun-06-2024-09-27-51-9343-AM

7.  Select the value you want to filter.

  • In this example, because we select a time dimension with date and hour we can select the date and the hour we want to filter.
 
  • This filter will leave only data from May onwards since we selected to exclude all data prior to April 30th at 11:30 PM.

    8.  Finally click on save.

    Browser template (4)-Jun-06-2024-09-33-10-3956-AM

    Learn more about the filters available and their condition in this FAQ.

     

    How to edit the filter

    If you click on the pencil next to the filter you will be able to modify the filter.

    Browser template (5)-Jun-06-2024-09-47-50-7660-AM

    Also by clicking on the name of the filter, you can access the filter panel where you can see all the filters you had created on that report.

    Browser template (6)-Jun-06-2024-09-48-44-4688-AM

    Browser template (7)-Jun-06-2024-09-50-28-7711-AM

    How to run calculations in Looker Studio

    In addition to the filters, Looker has wide versatility in terms of the formulas that you can use on its platform. The calculated fields allow you to create metrics and dimensions from your own data based on your needs so you can extend and transform your information.

    Keep in mind that Dataslayer only provides connectors, which are available within Looker Studio. We cannot add, improve, or change anything about Looker or its usability. Please contact Google support if you have any complaints or suggestions about Looker Studio.

    First of all, there are two ways to create a new metric:

    1.  Creating a new metric or dimension for that report

    If you want to create a metric only for that report specifically because you will not use it too much or maybe it's just not so important to you, create the metric just for one widget.

    In the setup of the chart you want to create the new metric, click on "Add metric" or "Add dimension" and at the end of the list you will see the "Create field" button.

    Browser template (8)-Jun-06-2024-09-53-00-3521-AM

    2.  Creating a new metric or dimension for the data source

    If you want to create a metric that is very useful for that data source and you want to keep it to be able to use it on another report, create the metric on the data level.

    Click on the Data button on the right side of the Looker Studio panel and at the end of the list you will see the "Create field" button.

    Browser template (9)-4

    Now that you know how to create a new field let's see some examples of what we can do with it.

    Combining two metrics in one

    While creating reports for our social media accounts, Instagram for example, we often want to see the image of the post we are pulling data from. This is possible with our "Media Thumbnail" dimension, which gives us the image of the Reels and videos, and the "Media Image" dimension, which gives us the image of the publication (photo). However, selecting these two will give us two separate columns, one for each dimension.

    Browser template (1)-Jun-11-2024-09-51-45-7051-AM

    In this example, we are going to create a dimension that joins these two to have them both in the same column.

    1.  First, let's create a new dimension. So click on "Add dimension" and "Create field" as explained before.
    • We just want it for this example so we will create it just for this widget.

    Browser template (2)-Jun-11-2024-09-56-43-5473-AM

    2.  A window will appear. You can name the dimensions as you want.

    • In this case, we will name it "Media Post".

    Browser template (6)-Jun-11-2024-10-06-09-7589-AM

     

    3.  Now we will use the formula "IF" to join the dimensions in one. IF formulas work with a condition, a result if that condition is true, and a result if that condition is false:

    IF (condition, true_result, false_result)
    • In this example, our formula will be the next one:
    IF(Media thumbnail="--", Media Image, Media thumbnail)

    This means that if the Media thumbnail is null, insert Media Image, If isn't null insert Media Thumbnail.

    Learn more about the formulas you can use and how it works on Looker Studio Support.

    Browser template (7)-Jun-11-2024-10-06-24-3820-AM

     

    4.  Once done with the formula, Looker will tell you if it's a valid formula or not. You can also change the type of dimension or metric.

    • Here we can see that our formula is valid. And our dimension it's an image so let's change it to that.

    Browser template (8)-Jun-11-2024-10-08-00-2618-AM
    Browser template (9)-Jun-11-2024-10-11-16-0120-AM

    5.  Finally, click on "Apply".

    Browser template (10)-4

    Learn more about the calculated fields on Looker Studio Support.

     

    Done! Now you can see all the media of your posts together in just one column.

    Browser template (11)-3

    Blend data

    Another example of what you can do with Looker is that if you want to see the cost you had in two different data sources it is possible with the blend data.

    If you want to learn more about blend read this FAQ.

    1.  Click on "Resource", "Manage blends" and "Add a blend".

    Browser template (12)-3

    Browser template-Jun-12-2024-09-34-28-1887-AM

    2.  Select the data source and the metrics you want to pull from it.
    • In this case, we will select Google Ads as a data source, for the dimension "Date", and for the metric "Cost (EUR)".

    Browser template (1)-Jun-12-2024-09-35-46-4363-AM

    3. The next step is to click on "Join another table" and select the data source you want to blend with.
    • In this example, we will select Facebook Ads with the same dimension and metric as Google Ads.

    Browser template (2)-Jun-12-2024-09-36-26-6876-AM

    Browser template (3)-Jun-12-2024-09-37-30-5052-AM

    4. Now, let's configure a join and click on Save.
    • In this case, we will select the inner operator so it will return the matching rows of date.

    Learn more about operators and blend data on Looker Studio Support.

    Browser template (4)-Jun-12-2024-09-38-39-2095-AM

    Browser template (5)-Jun-12-2024-09-43-49-6320-AM

    5.  Finally, you can give a name to this blended data and click on Save.

    Browser template (6)-Jun-12-2024-09-44-50-8205-AM

    6.  And once saved close the window.

    Browser template (7)-Jun-12-2024-09-45-53-7828-AM

    7.  Once done blending the data, let's add a chart with the blended data as a data source, the dimension date, and the metric cost of each data source (table).

    Browser template (8)-Jun-12-2024-09-49-07-6721-AM

    Done! Now you have the costs of both data sources in one tab.

    You can also combine these two metrics as the sum of both to see the total cost of both data sources.

    1.  Click on "Create field" as we have explained in the previous example. Let's name this metric "Total Cost Google + Fb".

    Browser template (9)-Jun-12-2024-10-16-26-9295-AM

    2.  Now let's sum these to metrics. But to avoid errors let's use the formula IFNULL.
    • IFNULL formula will make that in case the metric returns a null value it will change it to 0, avoiding addition errors. So the formula will be:
    IFNULL(Total Cost (EUR), 0) + IFNULL (Cost (EUR), 0)

    Learn more about the formulas you can use and how it works on Looker Studio Support.

    Browser template (10)-Jun-12-2024-10-17-27-9508-AM

    3.  Revise that the type is selected as a number and click on "Apply".

    Browser template (11)-4

    4.  Looker Studio will automatically give the format SUM (if not, change it to this format), and done! You will be able to see the column of the sum of both metrics.

    Browser template (12)-4

    Remember that Dataslayer only provides connectors, which are available within Looker Studio. We cannot add, improve, or change anything about Looker or its usability. Please contact Google support if you have any complaints or suggestions about Looker Studio.

    We hope that this summary and tips will be useful and that from now on you will be able to create reports more easily and with the information that is most valuable for your work.

    As always, please contact us via our live chat on our website or via email if you still have doubts or questions. We are happy to help!