Forum Discussion
Index Column based on 2 columns while 1 column include some duplicated values
I already tried RANKX but didnt find out the right way.
chaichatp If you're just looking for an index column, you can also create in Power Query. This blog has more than you need, but the first bit is on simple Index: https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
What is your data source? The sort in Power Query sometimes requires a Table.Buffer step before or within the index, but after the sort.
5 Replies
- AllisonKennedy
Community Champion
chaichatp If you're just looking for an index column, you can also create in Power Query. This blog has more than you need, but the first bit is on simple Index: https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
What is your data source? The sort in Power Query sometimes requires a Table.Buffer step before or within the index, but after the sort.
- chaichatp
Helper III
That's what I was looking for. Thanks so much.
- AllisonKennedy
Community Champion
chaichatp You're very welcome. Glad it worked. 🙂
- amitchandak
Super User
chaichatp , You can use RankX with breaking ties. Mentioned in
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Breaking-Ties-in-Rankings-with-RANKX-Using-Multiple-Columns/ba-p/918655- chaichatp
Helper III
Thank you. Let me try.