Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
hbgv123
Frequent Visitor

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

1 ACCEPTED SOLUTION
ToddChitt
Super User
Super User

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.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

1 REPLY 1
ToddChitt
Super User
Super User

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.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.