Returns the highest value that results from evaluating an expression for each row of a table.
Quick Coach Video |
What it does? Returns the highest value that results from evaluating an expression for each row of a table. Syntax MAXX( <table>, <expression>,[<variant>]) Returns The largest value. |
What is the MAXX Function?
The MAXX function in DAX is like a keen talent scout—it assesses each participant's performance and identifies the top achiever based on specific criteria! Whether you’re evaluating scores in a competition or calculating totals based on different metrics, MAXX helps you find that standout value by reviewing each row in a table.
Example 1: Highest Student Grade
Let’s say you’re a teacher who wants to find out which student has the highest final grade across multiple assignments. Here’s how your grade data might look:
Student Name |
Assignment 1 |
Assignment 2 |
Assignment 3 |
Matt |
85 |
90 |
88 |
John |
78 |
82 |
80 |
Zane |
92 |
95 |
90 |
Andrew |
85 |
87 |
80 |
To find the highest total grade for each student, you’d use the MAXX function like this:
Max Student Grade =
MAXX(StudentGrades, StudentGrades[Assignment 1] +
StudentGrades[Assignment 2] + StudentGrades[Assignment 3])
So, who scored the highest total grade? The maximum total grade is 277! 🎓🌟
Example 2: Highest Recipe Rating
Now imagine you’re a food blogger tracking the ratings of different recipes you’ve created. Here’s how your recipe data might look:
Recipe Name |
Taste Score |
Presentation Score |
Lasagna |
8 |
9 |
Tiramisu |
10 |
8 |
Caeser Salad |
7 |
8 |
Tacos |
9 |
10 |
Max Recipe Rating =
MAXX(RecipeRatings, (RecipeRatings[Taste Score] +
RecipeRatings[Presentation Score]) / 2)
So, which recipe received the highest overall rating? The maximum rating is 9.5! 🌮✨
Conclusion: Max It Out with MAXX!
The MAXX function in DAX is your essential tool for evaluating expressions across rows in a table and discovering the top value. Whether it’s the best-rated recipe or the highest student grade, MAXX helps you pinpoint the stars!
So, what are you waiting for? Let’s start maximizing those values with the MAXX function! 🎊🥳