Looker Studio Function : NARY_MIN

Category: Arithmetic function

The NARY_MIN function in Looker Studio evaluates a set of numerical inputs and returns the smallest value among them. Unlike the standard MIN function, which operates on a single data set, NARY_MIN allows for the comparison of multiple fields or expressions simultaneously.

Purpose of the NARY_MIN Function

1. Data Distribution Analysis :

By identifying the minimum values across different categories or time periods, NARY_MIN helps in understanding the distribution of data, highlighting areas that may require attention or improvement.

2. Customer Segmentation :
In customer segmentation, NARY_MIN can pinpoint the least engaged or lowest spending segments, allowing businesses to tailor strategies to improve these areas.

3. Decision Making :

Access to the smallest values in datasets aids decision-makers in identifying underperforming areas, enabling informed choices to optimize operations and strategies.

Type of Calculation:

Use CaseDescription
Performance BenchmarkIdentifying the lowest performance metrics to set improvement targets.
Customer SegmentationPinpointing segments with the lowest engagement or revenue.
Time Series AnalysisDetecting the lowest values over time to identify trends or anomalies.

NARY_MIN(X, Y, [,Z]*)

Parameters:

  • X, Y, Z: Numerical inputs or fields to compare.

Type and Description:

  • Input Type: All inputs must be of the same data type (e.g., all numbers).

  • Output: Returns the smallest numerical value among the inputs

How Does the NARY_MIN Function Work?

NARY_MIN evaluates each input value and returns the smallest one. If any input is null or zero, it is treated accordingly to ensure accurate comparisons


When Should You Use NARY_MIN?

Utilizing NARY_MIN simplifies the process of comparing multiple values, saving time and reducing the complexity of formulas. It’s particularly useful in dashboards and reports where quick identification of minimum values is crucial.

Example of  NARY_MIN with Result

Example 1: Basic Usage
To find the minimum sales value among three products:

NARY_MIN(Product A Sales, Product B Sales, Product C Sales)

Example 2: Column Usage 
To determine the minimum sales across different regions:

NARY_MIN(Sales Region 1, Sales Region 2, Sales Region 3)

Example 3: Handling Decimals and Scientific Notation

Ensure all inputs are in the same format to avoid discrepancies, especially when dealing with large numbers.

Example 4: Combining with Other Functions

NARY_MIN(SUM(Sales), AVG(Sales), MAX(Sales))

This combination allows for a comprehensive analysis by comparing the sum, average, and maximum sales values.

Tips and Tricks

  • Consistent Data Types: Ensure all inputs are of the same data type to prevent errors.

  • Use in Blended Data: When blending data from multiple sources, NARY_MIN can help identify the minimum values across datasets.

  • Avoid Null Values: Use functions like IFNULL to handle null values before applying NARY_MIN.

1. Can I use NARY_MIN with text fields?

No, NARY_MIN requires numerical inputs.

2. What happens if one input is null?

Null values are treated as the lowest possible value, affecting the result.

3. Can NARY_MIN be used in calculated fields?

Yes, it’s commonly used in calculated fields to compare multiple metrics.

4. Is NARY_MIN available in all Looker Studio versions?

Yes, it’s available in the latest versions of Looker Studio.

5. How do I handle scientific notation in NARY_MIN?

Ensure all inputs are in the same format and scale to avoid misinterpretation