Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

  • 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's avatar
      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.

      • Fowmy's avatar
        Fowmy
        Super User

        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

  • 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

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    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.