Forum Discussion
Ranking
Hello guys, I have an issue I can not move on.
I have a table of clients with contacts to them. Each client can have 1, 2, or multiple contacts. I need a new field let's say "rank" that will assign numbers 1,2,3 and so on based on how many contacts are related to a client. In excel there is similar function RANK which basically doe this, but how can I do it in PBI?
Thanks for help in advance.
Hello, I finally found the solution here. This is exactly what I was looking for. But thank you for your help trying very quickly.
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
6 Replies
- Jihwan_KimSuper User
Hi, dmatliak
Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.
https://www.dropbox.com/s/19rqx3in7aqn86u/dmat.pbix?dl=0
Contact Count =DISTINCTCOUNT('Table'[Contact])Rank by Contact Count =RANKX(ALL('Table'[Client]), [Contact Count],,DESC)Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
- dmatliakFrequent Visitor
Hi Jihwan_Kim,
thank you for quick reply. But this is not what I am looking for. What I need as an output is this (see. the screenshot). For each customer I want all contacts to be showed but with rank 1,2,3 and so on, depending on how many contacts are for each client.
Thank you for help.
Dusan
- Jihwan_KimSuper User
Hi, dmatliak
Thank you for your feedback.
Sorry that I cannot create the relevant sample pbix file.
Please share your sample pbix file's link here in order to possibly not create any misunderstanding.
Thanks.