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 there,
I have data which looks like the following:
| ID | No of Customer |
| AX168 | 1081 |
| FH5308 | 1046 |
| CH2008 | 551 |
| FK7784 | 1336 |
| WK2752 | 1456 |
| QT5202 | 390 |
| AT7642 | 525 |
| AB4 | 543 |
| AT7692 | 347 |
| WK2755 | 620 |
| AX162 | 607 |
| CM822 | 725 |
| PC3 | 500 |
| EK480 | 461 |
| OT2 | 305 |
| ET5 | 635 |
| CH2006 | 842 |
| LF6576 | 198 |
| MG6 | 443 |
Now I want to create a measure which ranks based on the number of customers column. I wrote a code something like that:
Rank by Customer = RankX(ALL(Table),Table['No of Customer'],,DESC)
I know that Table['No of Customer'] is the wrong argument and it should be replaced by expression. However, did not know what the replacement should be? Could anyone help me in that?
Solved! Go to Solution.
@Dunner2020 - See this article - https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
@Dunner2020 - See this article - https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
@Greg_Deckler , I followed the article and changed my code to the following:
@Dunner2020 , Are trying Column Rank (Static) or measure Rank( Dynamic and Context sensitive.
New column
ICP Rank = RANKX( ALL('Table'),[ICP],,DESC)
New Measure
ICP Rank = RANKX( ALL('Table'),Calculate(Sum([ICP])),,DESC)
or
ICP Rank = RANKX( ALL('Table'[Customer]),Calculate(Sum([ICP])),,DESC)
ICP Rank = RANKX( ALLSELECTED('Table'[Customer]),Calculate(Sum([ICP])),,DESC)
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/3...
@Dunner2020 - You need an aggregator around it like SUM, MAX, etc.
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.