Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all.
A case of the Fridays with a bit of a brain scratcher.
I have a set of data that I'm trying to get the sum of the "max" total of 2 line types within a table, but only for a certain "type" of column.
Example Data Below:
| UNIT | QTY | LINE | TYPE |
| A | 3 | 1 | 0 |
| A | 3 | 1 | 0 |
| A | 3 | 2 | 0 |
| A | 3 | 2 | 1 |
| A | 3 | 3 | 1 |
| A | 3 | 3 | 1 |
| A | 3 | 3 | 1 |
| A | 3 | 3 | 1 |
| A | 3 | 4 | 2 |
| A | 3 | 4 | 2 |
| A | 3 | 5 | 2 |
| A | 3 | 5 | 2 |
| B | 4 | 4 | 2 |
| B | 4 | 4 | 2 |
| B | 8 | 5 | 2 |
| B | 8 | 5 | 2 |
For this I just want the total of the "MAX" qty of the Unit. But only for "Type 2"
Example of expected output below:
| UNIT | QTY |
| A | 6 |
| B | 12 |
So essentially I just want the total of Unit A but only for Type 2. So it would take Line 3 and 4's max value and add them together.
Data has output like this due to a nice complicated join that for other queries on the dataset can't be shrunk down.
Appreciate any input on this one! (Really hope this is just a case of the Fridays!)
Solved! Go to Solution.
Excel worksheet formulas are powerful enough to resove it easily.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Excel worksheet formulas are powerful enough to resove it easily.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
This one did the trick. Many thanks!
@AlexanderPrime Try:
Measure = MAXX(FILTER('Table', [TYPE] = 2),[QTY])
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.