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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Comparing Column Values (Column A vs Column B)

Hi there! 

 

I've data coming from two different spreadsheets into my report that has employee names column. How can I compare employee names from source #1 to names in source#2 and generate a list of unique names in source #2? Source #2 has the accurate list of names. 

 

Any help would be appreciated! Thanks! 

2 ACCEPTED SOLUTIONS
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

I made one sampe using the formula as dedelman_clng provided. 

 

MissingEmpName = 
CALCULATETABLE(
    EXCEPT(
       Values('Source#2'[EmpName]),
       Values('Source#1'[EmpName])
    )
) 

Capture.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/mjvefqwjevxw67f/Comparing%20Column%20Values%20%28Column%20A%20vs%20Column%...

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Hi @Anonymous,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

6 REPLIES 6
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

I made one sampe using the formula as dedelman_clng provided. 

 

MissingEmpName = 
CALCULATETABLE(
    EXCEPT(
       Values('Source#2'[EmpName]),
       Values('Source#1'[EmpName])
    )
) 

Capture.PNG

 

For more details, please check the pbix as attached.

 

https://www.dropbox.com/s/mjvefqwjevxw67f/Comparing%20Column%20Values%20%28Column%20A%20vs%20Column%...

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Thank you David & Frank! Both solutions worked! 

 

I appreciate your help!

Hi @Anonymous,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
dedelman_clng
Community Champion
Community Champion

If Source#2 has the accurate list of names, what values do you want from Source#1 ? There are UNION, INTERSECTION and DISTINCT functions, but it depends on what you're really look for.  A small example set of data would be helpful.

 

David

Anonymous
Not applicable

Thanks! The goal is to create a table showing names from source #2 that are not in source #1..

In DAX, create a new table with the following code

 

MissingEmpName =
CALCULATETABLE( EXCEPT(
Values(Source#2[EmpName]), Values(Source#1[EmpName])
)
)

This should give you a table with a single column of names in Source#2 that are not in Source #1.

 

Hope this helps,

David

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.