This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hi
I have the input table as below. Is there any way to have the top 2 table ?
Logic for Top 2 Table:. Finding the top 2 category by Amt , then showing up the detail of category by Route
Thanks
Solved! Go to Solution.
@ngocnguyen I just called my source table Top 2 is all. See PBIX below sig.
| 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! |
| 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! |
Hi @CNENFRNL
Highly appreciate your support.
is there any way to get the Output as below?
Logic: get top 2 Amt by both CAT & Route
@ngocnguyen Try:
Table 3 =
VAR __Table = SUMMARIZE('Top2',[CAT],"__Amt",SUM('Top2'[Amt]))
VAR __Table1 = ADDCOLUMNS(__Table,"__Rank",RANKX(__Table,[__Amt]))
VAR __Categories = DISTINCT(SELECTCOLUMNS(FILTER(__Table1,[__Rank]<3),"__CAT",[CAT]))
RETURN
FILTER('Top2',[CAT] IN __Categories)
Many thanks for your support.
However, Top 2 table is the Output, but in your Dax formular, you calling the Top 2 table?,
It 's a litte bit confusing. Could you please check again?
@ngocnguyen I just called my source table Top 2 is all. See PBIX below sig.
Thanks so much. So is there any way to get the Ouput by setting up measure. I wana the Ouput can appear in the Report tab in PBI
@ngocnguyen Sure, you could implement this as a Complex Selector. The Complex Selector - Microsoft Power BI Community
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 25 | |
| 24 | |
| 22 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 44 | |
| 44 | |
| 43 | |
| 21 | |
| 21 |