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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Comparing values two different tables

I have two tables joined on an ID column.  Both tables have a similar field called "Practice", and I need to check if the values are the same.  I am trying to use the EXACT function, but when I choose my first field from Table1, it doesn't allow me to pick the second field from TAble2.  How do I compare strings of two fields from two different tables?

6 REPLIES 6
Greg_Deckler
Super User
Super User

@Anonymous  - Use RELATED or something like MAXX(RELATEDTABLE(...),[2nd Column]).

 

Since I see that you are a New Member, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
ilton
Helper I
Helper I

Hi! @Anonymous

checkout this link on joining tables with DAX Joining tables 

Fowmy
Super User
Super User

@Anonymous 

I am not sure if you are trying a measure, in that case use LOOKUPVALUE function.
If you generate a table try INTERSECT or EXCEPT

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

ilton
Helper I
Helper I

Hi! @Anonymous 

The EXACT function doesnt compare values from two table.

Can you give more information on your Goal.

 

You can try making a join with Power Query.

= Table.Join(Table1, "Practice", Table2, "Practice")

 

If I solved your problem please consider marking this as a solution.

Anonymous
Not applicable

It is basically a quality control check.  TAble A is from one system, and table B is from another system.  Both tables "should" have the same practice name per ID, but they don't always.  So I need to find where they don't match so we can do a clean-up.

@Anonymous 

You can try like the following example, these two tables will show rows of one table which do not appear in another table.

Table 1 = EXCEPT(VALUES(Employees1[FirstName]),VALUES(Employees2[FirstName]))

Table 2 = EXCEPT(VALUES(Employees2[FirstName]),VALUES(Employees1[FirstName]))

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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