We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 36 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 38 | |
| 34 | |
| 23 |