Add Index without unique values - Power BI / DAX / M

大憨熊 提交于 2020-12-15 05:03:40

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!