March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi folks, My problem appears to be very simple:
I have a MIN and a MAX value - easy. But how can I show the name of the category of the MAX/MIN value? Here an example:
So depending on the MIN/MAX value in column "Weight", I want the column value in "Receipe" to appear.
Thanks!!
Solved! Go to Solution.
RECIPE Max =
MAXX( TOPN( 1, 'DATA TABLE', 'DATA TABLE'[Weight] ), 'DATA TABLE'[RECIPE] )
RECIPE Min =
MAXX( TOPN( 1, 'DATA TABLE', 'DATA TABLE'[Weight], 1 ), 'DATA TABLE'[RECIPE] )
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! |
RECIPE Max =
MAXX( TOPN( 1, 'DATA TABLE', 'DATA TABLE'[Weight] ), 'DATA TABLE'[RECIPE] )
RECIPE Min =
MAXX( TOPN( 1, 'DATA TABLE', 'DATA TABLE'[Weight], 1 ), 'DATA TABLE'[RECIPE] )
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! |
@I_LOVE_POWER_BI , Try meausre like
Switch(true(),
Max(Table[Receipe]) = "Orange Cake", min(Table[Weight]),
Max(Table[Receipe]) = "Apple Cake", max(Table[Weight])
)
or
sumx(values(Table[Receipe]),
Switch(true(),
Max(Table[Receipe]) = "Orange Cake", min(Table[Weight]),
Max(Table[Receipe]) = "Apple Cake", max(Table[Weight])
)
)
Thanks @amitchandak ,
I didn't explain it well enough, sorry. The two cakes are just an example out of a lot of different variables. I need it to be dynamically, not based on those two fixed values.
So the measure has to first lookup the MIN value and then show the name of the respective receipe. How to da that?
@I_LOVE_POWER_BI ,Can you share sample data and sample output in table format?
@amitchandak thanks for your kind support. So here is the example, which shows how easy my request actually is:
I have a card in which I want to show "Orange Cake", because it is the Max-value. As you can see in the filter ribbon, this must be dynamic, because depending on the receipe I choose, I want to see which is the receipe name with the highest value.
Thanks again!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |