Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
[Edited please see sample file here]
Hello! I'm using this measure to get the item that received the most and least ordered:
Solved! Go to Solution.
Hi @dataaanana ,
We can create measures.
rank1 = RANKX(ALL(Menu),[Items Sold],,DESC)
rank2 = RANKX(ALL(Menu),[Items Sold],,ASC)
the third item(least) = CALCULATE(MAX('Menu'[item_name]),FILTER(ALL('Menu'),[rank2]=3))
the third item(most) =
CALCULATE(MAX('Menu'[item_name]),FILTER(ALL('Menu'),[rank1]=3))
Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dataaanana ,
We can create measures.
rank1 = RANKX(ALL(Menu),[Items Sold],,DESC)
rank2 = RANKX(ALL(Menu),[Items Sold],,ASC)
the third item(least) = CALCULATE(MAX('Menu'[item_name]),FILTER(ALL('Menu'),[rank2]=3))
the third item(most) =
CALCULATE(MAX('Menu'[item_name]),FILTER(ALL('Menu'),[rank1]=3))
Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.