Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi guys,
I have to rank customer name by Total Revenue, with the following condition:
If revenue is blank or 0, I rank it as 0 so that it wont mess up the ranks
Now, going to the problem,
If column A is in the table, I get 1s. If I add column B, I get multiple 1s again. But when I concatenate A and B and call it C, it gives the correct rankings when I display column C only. But what I want to display is A and B separately, in a table with correct rankings.
By the way, column B can have multiple A. For example Cust Name = Test can have multiple Customer Number.
Solved! Go to Solution.
Hi @Anonymous ,
I created a table using your data.
Create a new column.
Ranking =
IF (
[Revenue] = 0
|| ISBLANK ( [Revenue] ),
BLANK (),
RANKX ( ALLSELECTED ( 'Table'[Revenue] ), [Revenue] )
)
Put column A, column B and Ranking column into table visual. The result should be like this.
Attach the pbix file for reference. Hope it helps.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @Anonymous ,
I created a table using your data.
Create a new column.
Ranking =
IF (
[Revenue] = 0
|| ISBLANK ( [Revenue] ),
BLANK (),
RANKX ( ALLSELECTED ( 'Table'[Revenue] ), [Revenue] )
)
Put column A, column B and Ranking column into table visual. The result should be like this.
Attach the pbix file for reference. Hope it helps.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
@Anonymous , Try if this one can work
Ranking = if([ Revenue] = 0 || isblank([Revenue]), blank(), RANKX(ALLSELECTED(Customer[Cutomer]) ,[Revenue]))
Hi,
It didnt work. What I got is:
When I retain only column C (concatenate of A and B), I get the correct ranking:
What I want to display in the table is column A and B and drop column C but with correct ranking
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 53 | |
| 42 | |
| 30 | |
| 24 |