Dax Function: MINA
Category: Aggregation functions
The MINA function in Power BI is a DAX (Data Analysis Expressions) function that calculates the smallest value in a column or a set of scalar values. Unlike the standard MIN function, MINA includes non-numeric data in its evaluation, such as logical values (TRUE/FALSE) and blanks, which it interprets in specific ways.
Purpose:
- To determine the minimum value in a column while considering logical and blank values in addition to numeric or date data.
Type of Calculations:
- Handles mixed data types, interpreting
TRUEas1,FALSEas0, andBLANKas0. - Performs a more inclusive evaluation compared to the standard MIN function.
Practical Use Cases:
- Logical Comparisons: Evaluate columns containing logical data along with numbers or dates.
- Data Cleaning: Identify the smallest interpreted value in datasets with mixed data types.
- Error Handling: Analyze datasets where blanks or logical values might affect calculations.
MINA(<column>)</column>
| Parameter | Type | Description |
|---|
column | Column | The column to evaluate. Can include numeric, date, logical, or blank values. |
How Does MINA Dax Function Works?
- Evaluation of Data: The function evaluates all rows in the specified column.
- Conversion Rules: Non-numeric values are converted:
TRUE→1FALSE→0BLANK→0
- Comparison: The smallest value, based on the data type and conversions, is returned.
What Does It Return?
The MINA function returns a scalar value representing the smallest interpreted value in the column.
- Numeric columns: Returns the smallest number.
- Date columns: Returns the earliest date.
- Logical values: Interprets
TRUEas1,FALSEas0. - Blank values: Treated as
0.
When Should We Use It?
- Mixed Data Columns: Use when columns include numbers, logical values, or blanks.
- Data Quality Checks: Identify unexpected small values in inconsistent datasets.
- Logical Data Analysis: Useful when dealing with boolean columns or calculations involving logical expressions.
Examples
Basic Usage
Evaluate the smallest value in a column containing mixed data:
MinValue = MINA(Sales[MixedData])
Column Data:[10, 20, TRUE, FALSE, BLANK]
Result: 0 (interpreted from FALSE or BLANK).
Column Usage
Find the earliest date in a column, considering logical values:
MinDate = MINA(Sales[TransactionDate])
Column Data: [2025-01-01, 2025-01-10, TRUE, FALSE, BLANK]
Result: 2025-01-01 (earliest valid date).
Advanced Usage
Combine with FILTER to find the minimum value for a specific condition:
FilteredMin = MINA(FILTER(Sales, Sales[Region] = "East"), Sales[Revenue])
Result: The smallest revenue value for the “East” region, considering logical and blank values.
Tips and Tricks
- Understand Conversions: Be aware of how MINA interprets non-numeric data.
- Use in Mixed Data Scenarios: Opt for MINA over MIN when columns contain logical or blank values.
- Avoid Unintentional Results: Ensure the presence of logical or blank values is intentional to prevent skewed outcomes.
Performance Impact of MINA DAX Function:
- Efficient for Small Datasets: Performs well with fewer rows and simple data types.
- Optimizations for Large Datasets: Consider filtering or summarizing data before applying MINA for better performance.
Related Functions You Might Need
- MIN: Returns the smallest value in a column, ignoring logical and blank values.
- MINX: Evaluates an expression over a table and returns the minimum result.
- MAXA: Finds the largest value in a column, including logical and blank values.
- AVERAGEA: Computes the average, considering logical and blank values.
Want to Learn More?
For more information, check out the official Microsoft documentation for MINA. You can also experiment with this function in your Power BI reports to explore its capabilities.
If you’re looking to unlock the full potential of Power BI and take your data insights to the next level, our expert Power BI consulting services are here to help. Whether you need assistance with implementing advanced DAX functions like the ones discussed here, creating interactive dashboards, or optimizing your data models for better performance, our team of seasoned Power BI consultants is ready to provide tailored solutions for your business. Visit our Power BI Consulting page to learn more about how we can empower your organization with data-driven decisions.
MIN evaluates only numeric and date values, while MINA includes logical (TRUE, FALSE) and blank values.
Blank values are treated as 0 by the MINA function.
No, MINA does not support text values. It is designed for numeric, date, logical, and blank values.
If the column contains only blanks, the function returns 0.
The performance is similar, but MINA may take slightly longer due to additional evaluations for logical and blank values.