Evaluates an expression for each row in a table and returns the smallest value
Quick Coach Video |
What it does? Evaluates an expression for each row in a table and returns the smallest value Syntax MINX(<table>,<expression>) Returns A single value (the smallest number) |
What is the MINX Function?
The MINX function in DAX acts like a meticulous analyst, evaluating an expression across each row of a specified table and determining the smallest result. Whether you’re assessing costs, performance metrics, or any data where row-wise calculations matter, MINX allows you to pinpoint those crucial minimum values that can inform your decisions!
Example 1: Lowest Customer Satisfaction Score Adjusted for Comments
Let’s say you’re evaluating customer satisfaction scores that also include a score adjustment based on customer comments (e.g., deducting points for negative feedback). Here’s how your data might look:
Customer Name |
Satisfaction Score |
Negative Feedback (Points) |
Jade |
5 |
0 |
Nick |
4 |
1 |
Zach |
3 |
2 |
Steven |
3 |
1 |
Lauren |
2 |
0 |
To find the lowest adjusted satisfaction score, you’d use the MINX function like this:
Min Adjusted Satisfaction Score =
MINX(CustomerFeedback,
CustomerFeedback[Satisfaction Score] -
CustomerFeedback[Negative Feedback (Points)])
So, what’s the lowest adjusted score? The minimum is 1 from Zach! 🌟🤔
Example 2: Lowest Roller Coaster Ride Score
Imagine you’re at an amusement park, rating the thrill of various roller coasters! You and your friends rate each ride based on how terrifying and exhilarating it was (with 1 being “not scary at all” and 5 being “I screamed the whole way down”). Here’s how your data might look:
Ride Name |
Thrill Score |
Age Restriction (Years) |
The Screamer |
5 |
12 |
Loop de Loop |
4 |
10 |
The Twister |
3 |
8 |
Kid’s Carousel |
1 |
0 |
The Plunge |
4 |
14 |
To find the lowest thrill score among the rides that have age restrictions, you’d use the MINX function like this:
Min Thrill Score =
MINX(RollerCoasterRatings,
RollerCoasterRatings[Thrill Score] *
IF(RollerCoasterRatings[Age Restriction (Years)] < 10, 0, 1))
So, what’s the lowest thrill score? The minimum is 1 from the Kid's Carousel—definitely more fun for the little ones than for the thrill-seekers! 🎢😄
Conclusion: Discover Depths with MINX!
The MINX function in DAX empowers you to evaluate expressions dynamically across rows, helping you uncover the smallest values that matter most. Whether you’re assessing roller coaster thrill levels or adjusting satisfaction scores, MINX allows you to delve deeper into your data. Let’s explore those depths and find the insights hidden within! 🔎✨