RuffRuff App RuffRuff App by Tsun

[Looker Studio] How to Use the MIN Function and Practical Examples | Calculated Fields

[Looker Studio] How to Use the MIN Function and Practical Examples | Calculated Fields

In this article, we will clearly explain how to use the MIN function in Looker Studio and provide specific examples of its application. By utilizing the functions available in Looker Studio, you can manipulate and visualize your data effectively.

The MIN function cannot be used with GA4 (Google Analytics 4), Search Console, or Google Ads when using connectors. However, it can be applied to data imported from spreadsheets.

What are Calculated Fields in Looker Studio?

Calculated Fields in Looker Studio are a handy feature that allows you to create custom fields by using operators (such as addition, subtraction, multiplication, division), functions, and regular expressions based on existing items for use in reports.

Also, for basic usage of Looker Studio, please refer to the "How to Use Looker Studio" guide. Looker Studio is a very convenient tool that is free to use and allows for the creation of easy-to-understand reports by connecting to various data sources, so let's make active use of it.

What is the MIN Function?

The MIN function is used to obtain the "minimum value" of a specified numeric field. It is applied to fields containing numeric data and retrieves the minimum value from all the numbers within the selected range. This function helps in understanding trends of specific metrics.

Syntax

The syntax for the MIN function is as follows:

MIN("number")

"Number" specifies the value for which you want to obtain the minimum. The minimum of this value will be obtained. You can also specify the "date" format. In that case, the oldest date will be obtained.

Conditions for Using the MIN Function

There are two conditions for using the MIN function. Before using it to obtain the minimum value, ensure that the number meets the following criteria:

It Must Be a Number (Including Dates)

The MIN function is designed to find the minimum value, so it cannot be used for dimensions that are not numerical.

It Must Not Be an Aggregated Metric

If the numerical data from the data source has already been aggregated by a connector or similar tool, the MIN function cannot be used. You can determine if a number is aggregated by checking if the default aggregation of the data source is set to automatic. The MIN function cannot be used on automatically aggregated numbers, so please be cautious.

aggregated metrics

 (Quote:Looker Studio)

How to Use the MIN Function

To use the MIN function, you need to create a calculated field in Looker Studio. There are two types of calculated fields: data source calculated fields and chart-specific calculated fields. This article will focus on creating a data source calculated field, but for more detailed differences between the two, please see the differences between data source calculated fields and chart-specific calculated fields.

As previously mentioned, the MIN function cannot be used with metrics from data sources such as GA4 (Google Analytics 4), Search Console, and Google Ads that utilize connectors. Therefore, for this example, we have prepared sample data in a spreadsheet containing daily customer and sales data for each store. I will use this sample data to explain.

Use case:Visualizing the Minimum Sales Value in Looker Studio

Set the calculated fields as follows.

lookerstudio-min-setting

(Quote:Looker Studio)

  1. Field Name: Please enter any field name.

  2. Formula: MIN(Sales)

  3. Save: Once you have entered the information, click Save.

A field named sales_min has now been created as shown below.

lookerstudio-min-metric

 (Quote:Looker Studio)

 Let's add the metrics we just created to the report so they can be utilized. By doing so, you will see that the numbers are correctly reflected in the table.

lookerstudio-min-graph
 (Quote:Looker Studio)

 Additionally, by comparing with metrics created using functions like AVG and MAX, it can also help understand sales disparities. 

 (Quote:Looker Studio) 

How to Find the Minimum Value Without Using Calculated Fields

For relatively simple calculations such as minimum values, you can reflect them in the report without using calculated fields. This guide explains the procedure.

Use case:Visualizing the Minimum Customers in Looker Studio

First, click the mark on the left side of the metric for which you want to find the minimum value in the report.

lookerstudio-min-customer-setting

 (Quote:Looker Studio)

 Next, enter the name and check the box for "Minimum" as the aggregation method.

lookerstudio-min-customer-named

 (Quote:Looker Studio)

Now, the settings have been applied to the report, and the minimum number of customers is displayed. This concludes the explanation on how to display the minimum value using the MIN function. Please give it a try.

Relevant Looker Studio Official Documentation

Looker Studio Official Help : About calculated fields

Looker Studio Official Help : Function list

Back to blog

Featured collection