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
tomsuare
Frequent Visitor

Get new table containing unique values from existing table.

Hello Everyone I have a dataset that looks like this and want to get a table containing only unique values. 

 

Employee IDCompany Worked
123CompanyCars
345

CompanyCars

678CompanyBus
123CompanyAircrafts


And the goal is to get unique values in another table that looks like this either by using power query or dax: 

Employee IDCompany Worked
123CompanyCars
345

CompanyCars

678CompanyBus
2 ACCEPTED SOLUTIONS
FreemanZ
Super User
Super User

hi @tomsuare 

try to create a calculated table like:
table = 
ADDCOLUMNS(
   VALUES(TableName[Employee ID]),
   CALCULATE(MAX(TableName[Company Worked]))
)

View solution in original post

v-jingzhang
Community Support
Community Support

Hi @tomsuare 

 

Here is one option with Power Query. Use Group By feature. 

vjingzhang_0-1675911462498.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

In the Result table, why have you chosen Cars over Aircrafts for Employee ID 123? 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Edited due to misstyping.

Your question is still not clear.  Do you want to keep the active rows or the inactive rows?  Take a larger dataset, explain the question in simple English and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-jingzhang
Community Support
Community Support

Hi @tomsuare 

 

Here is one option with Power Query. Use Group By feature. 

vjingzhang_0-1675911462498.png

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

FreemanZ
Super User
Super User

hi @tomsuare 

try to create a calculated table like:
table = 
ADDCOLUMNS(
   VALUES(TableName[Employee ID]),
   CALCULATE(MAX(TableName[Company Worked]))
)

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.