---
title: MINX
description: Learn how to use MINX to find the minimum value in your dataset based on specific conditions. This guide covers practical scenarios, syntax, and examples.
---
import { Aside, Steps } from '@astrojs/starlight/components';

# MINX

The MINX function in Infoveave finds the minimum (smallest) value in a dataset or column based on a specified condition.

## Applicable to

* Calculated Columns
* Expressions

## Return Value

The minimum value in the related table of the widget that satisfies the condition.

## Remark

* MINX is useful for finding the smallest value under specific conditions.
* MINX excludes nulls and blanks.
* MINX works with Dates, Strings, and Numbers.

## Syntax

```
MINX(<Reference>,<Condition>)
```

## MINX in Board Expression

<Aside>
Expressions add visual effects to your dashboard through widget-specific conditions. They don't manage or modify data.
</Aside>

| Parameter        | Description                                                                        |
|------------------|------------------------------------------------------------------------------------|
| Expression       | Placeholder replaced with the condition filter.                                    |
| Widget Name      | Specific name of the widget used for data visualization in the Infoboard.          |
| Measure          | Name of the measure displayed or analyzed using the widget.                        |
| Dimension        | Dimension column displayed or analyzed using the widget.                           |
| Dimension Value  | Specific dimension items within the dimension column used for widget visualization.|

Steps to Use MINX

<Steps>
1. Write the MINX function. For instance `MINX(<expression>,<condition>)`
2. Replace `<expression>` with `'Widget Name'[Measure]` and `<condition>` with `[Dimension Name]="Dimension Value"`. Replace **Widget Name**, **Measure**, **Dimension Name**, and **Dimension Value** with your actual values.
3. To learn how to configure an Expression in Infoveave, visit [Configure Expression](/insights-v8/advanced-configuration/#configuring-expressions).
</Steps>

<div role="alert">

**Scenario** You manage a solar energy company's customer database, including discount information. Your goal is to optimize discounts while ensuring a minimum number of customers receive a "Guaranteed" discount.

**Scenario Details**

* **Dashboard Name** Solar Energy Management Dashboard
* **Widget Name** Solar Feed In
* **Measure Name** Solar Customers
* **Dimension Name** Discount Types
* **Dimension Values** "Guaranteed"

**Objective** Find the minimum number of solar customers who must have the "Guaranteed" discount type. If yes it must trigger an action.

* You can use the MINX function like this

```
MINX('Solar Feed In'[Solar Customers], [Discount Types]="Guaranteed") > 10
```
</div>

## MINX in Calculated Columns

| Parameter       | Description                                                              |
|-----------------|--------------------------------------------------------------------------|
| Expression      | Placeholder replaced with the condition filter.                          |
| Column Name     | Name of the column containing values to analyze.                         |
| Filter Condition| Filter condition (string or numeric) that returns data points to analyze.|

Steps to Use MINX in Calculated Columns

<Steps>
1. Write the MINX function. For instance `MINX(<expression>,<condition>)`
2. Replace `<expression>` with `[Column Name]` and `<condition>` with `[Column Name]="Filter Condition"`. Replace **Column Name** and **Filter Condition** with your actual values.
3. To learn how to add calculated columns in Infoveave, visit [Calculated Columns](/studio-v8/datasources/calculated-columns-datasource/) under Sources.
</Steps>

<Aside type="caution">
Do not use double quotes when setting up a numeric filter condition.
</Aside>

<div role="alert">

**Objective** Find the minimum MARKET PRICE for COUNTRY = Brazil in a sales dataset.

| ORDER DATE | COUNTRY | CATEGORY   | UNIT PRICE | MARKET PRICE | QUANTITY |
|------------|---------|------------|------------|--------------|----------|
| 2024-01-03 | Brazil  | Baby Food  | 38.41      | 43.7874      | 2        |
| 2024-01-07 | Japan   | Spices     | 45.56      | 50.8155      | 20       |
|            | Japan   |            |            | 43.7874      | 10       |
| 2024-01-18 |         |            |            | 32.3019      | 4        |
| 2024-01-22 | Brazil  | Cosmetics  | 28.335     | 23.0109      | 7        |
| 2024-01-26 | Canada  |            | 20.185     | 23.0109      | 9        |
| 2024-01-04 | France  | Cereal     | 25.26      | 28.7964      | 9        |
| 2024-01-09 | Brazil  | Cereal     | 44.575     | 50.8155      | 8        |
| 2024-01-14 | Brazil  | Snacks     | 20.185     |              | 4        |
|            | Brazil  | Cosmetics  | 40.485     | 46.1529      | 2        |

* You can use the MINX function like this

```
MINX([MARKET PRICE], [COUNTRY] = "Brazil")
```

The calculated column "Min Market Price" will return 23.0109.

| ORDER DATE | COUNTRY | CATEGORY   | UNIT PRICE | MARKET PRICE | QUANTITY | MIN MARKET PRICE |
|------------|---------|------------|------------|--------------|----------|------------------|
| 03-01-2024 | Brazil  | Baby Food  | 38.41      | 43.7874      | 2        | 23.0109          |
| 07-01-2024 | Japan   | Spices     | 45.56      | 50.8155      | 20       | 23.0109          |
|            | Japan   |            |            | 43.7874      | 10       | 23.0109          |
| 18-01-2024 |         |            |            | 32.3019      | 4        | 23.0109          |
| 22-01-2024 | Brazil  | Cosmetics  | 28.335     | 23.0109      | 7        | 23.0109          |
| 26-01-2024 | Canada  |            | 20.185     | 23.0109      | 9        | 23.0109          |
| 04-01-2024 | France  | Cereal     | 25.26      | 28.7964      | 9        | 23.0109          |
| 09-01-2024 | Brazil  | Cereal     | 44.575     | 50.8155      | 8        | 23.0109          |
| 14-01-2024 | Brazil  | Snacks     | 20.185     |              | 4        | 23.0109          |
|            | Brazil  | Cosmetics  | 40.485     | 46.1529      | 2        | 23.0109          |
</div>
***
