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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Populate column with distinct values from another column in another table

Hi, as the title suggests I'm looking to populate a column in a new table with distinct values from a column in an existing table.

 

For example, Table1, Column1 = {1, 2, 2, 3, 4, 4, 5}

 

Should look like NewTable, NewColumn = {1, 2, 3, 4, 5}

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please try

 

Table2 = DISTINCT(Table1[Column1])

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Should be:

 

NewTable = DISTINCT(SELECTCOLUMNS('Table1',"NewColumn",[Column1]))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hello! Are you able to adapt this formula to create a new column with unique values from two other columns? Say, 

NewTable = DISTINCT(SELECTCOLUMNS('Table1',"NewColumn",{[Column1],[Column2]})

Or something to that effect? 

mahoneypat
Microsoft Employee
Microsoft Employee

Please try

 

Table2 = DISTINCT(Table1[Column1])

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Where do I enter this code?

@Anonymous - 

Greg_Deckler_0-1598314112972.png

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.