问题
I have a column with Countries (in a table, the column have duplicates) and I need to order them with a index:
Countries, Desirable index
A 1
B 2
B 2
C 3
D 4
D 4
E 5
I can't remove the duplicates because I need the other columns for reference
thanks
回答1:
Create a table of only distinct countries, index that table, then merge/join that table back to your existing table (the one with duplicates) and expand the index column you just created.
来源:https://stackoverflow.com/questions/65145128/add-index-without-unique-values-power-bi-dax-m