Forum Discussion

hbgv123's avatar
hbgv123
Frequent Visitor
3 years ago
Solved

How to create a table using distinct values and also create index based on distinct values?

Hi,

I was able to create new table using distinct values but i was not able to create index column in this new table.

any idea on how to add index in this new table?

 

 

 

Product_Table = DISTINCT('Table'[Product])​

 

 

 

 

 

Thanks,

Hari

  • Try it in Power Query. Do a GROUP BY on a copy (ore REFERENCE) of the original table. From there you can add an Index column.

    Question back to you: Of what use is the INDEX column? You can't reference it like a Primary Key/Foreign Key relationship because no other table know the values. And the order of the index is not controllable, other than by preceding it with a SORT operation in Power Query.

1 Reply

  • Try it in Power Query. Do a GROUP BY on a copy (ore REFERENCE) of the original table. From there you can add an Index column.

    Question back to you: Of what use is the INDEX column? You can't reference it like a Primary Key/Foreign Key relationship because no other table know the values. And the order of the index is not controllable, other than by preceding it with a SORT operation in Power Query.