Forum Discussion
Ranking
- 5 years ago
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
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
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.
- dmatliak5 years agoFrequent Visitor
Hello, here is the link. I just uploaded new table to your template. My wishful state ist to have new column having numbers 1,2,3 for each row within the customer ID (For example C01 will have numbers 1-5 because he has 5 different contacts).
- dmatliak5 years agoFrequent Visitor
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
- Jihwan_Kim5 years agoSuper User
Hi, dmatliak
Thank you for sharing.
I am not sure still whether I understood your question correctly.
I assume you want to have an index column per each client ID.
I think you are right and using RANKX function is one of many ways to create the index column.
However, by seeing the sample that is given by you, I thought I could not use RANKX, because there were no columns that can be ranked row by row.
So, I had no choice but to use Power Query.
I created a new table, and you can see this table inside the Power Query how the steps are to create the index column.
If you have a column that can be ranked, for instance, date column, then I can try to create it not by Power Query.