/    /  Amazon QuickSight – minIf

Amazon QuickSight – minIf

 

The ‘minIf()’ function in Amazon QuickSight is used to compute the minimum value of a measure that satisfies a specified condition. Here is an explanation of the minIf() function:

Syntax

#Start#
minIf(measure, condition)
#End#

 

This function takes one argument:

 

  • measure: This parameter specifies the measure for which the minimum value is to be computed.
  • condition: This parameter specifies the condition that the data must satisfy in order for it to be included in the computation of the minimum value.

 

 

Suppose we have a dataset that contains information about sales for different products and we want to find the minimum sales value for products that have sold more than 80 units. We can use the minIf() function in Amazon QuickSight to do this.

 

To find the minimum sales value for products that have sold more than 80 units, we can create a new visual in Amazon QuickSight and add a table with the following settings:

  • Drag the “Sales” measure to the Values section.
  • Click on the drop-down arrow next to “Sales” and select “MinIf”.
  • In the “Condition” field, enter “Sales > 80”.

 

This will result in a table that shows the minimum sales value for products that have sold more than 80 units.

 

Alternatively, we can create a calculated field in Amazon QuickSight with the following expression:

Example

#Start#
minIf(Sales, Sales > 80)
#End#

 

This expression will compute the minimum sales value for products that have sold more than 80 units.

 

For instance, if our sales data is as follows:

 

ProductSales
A100
B80
C120
D90
E70

 

Then, the minimum sales value for products that have sold more than 80 units will be:

 

Example

#Start#
minIf(Sales, Sales > 80) = 90
#End#

 

In this example, we can see that the minIf() function has computed the minimum sales value for products that have sold more than 80 units, resulting in a useful metric that can inform our business decisions.