Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Finding / Displaying Mismatch Between 2 Columns in Different Tables

Hello, was looking to recieve some advice for this scenario. 

 

I'm looking at 2 text columns from 2 different tables and need to compare them and print the ones that do not match.  It needs to display the differences from the 2 filtered visuals. Visual 1 uses a column in Table 1 and Visual 2 uses a column in table 2. Both tables are recording the similar information but is recorded in 2 different systems, so the objective is finding the deltas between the 2 systems and displaying it. 

 

Visual 1Visual 2 Visual 3 (Deltas)
NAMENAME NAME
AA D
BB F
CC  
ABCD  
 ABC  
 F  

 

Thanks in advance. 

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Zubair_Muhammad

      Thank you for the response, but this will not work for me. The 2 tables do not have the same amount of columns. The objective is, in Visual A it is showing a filtered data set from Table 1, while in Visual B it is also using the same filters, but using a data set from Table 2.  And from those 2 filtered data sets, i need to display the fields that mismatch.

       

      I believe I need to use a measure to properly do this, but where i get stuck is that these are text fields, therefore i cannot aggregate them to be used in a measure. Using the MAX of each text field in order to be able to use a measure will not work either since it is only taking the field with the largest length. 

      • v-lili6-msft's avatar
        v-lili6-msft
        Community Support

        hi, Anonymous

        Based on my test, you may try to use NOT and IN Function to add a measure as below:

        Step1:

        Add a name fact table

        (You could use this formula add a new name table 

        Name = DISTINCT(UNION(VALUES(Table1[Name]),VALUES(Table2[Name] )))

        )

        Step2:

        Create a measure like this:

        Measure = var _table=CALCULATETABLE(VALUES('Table1'[Name])) return
        CALCULATE(MAX('Name'[Name]),FILTER('Name',NOT('Name'[Name]) in _table))

        Step3:

        Drag the name field from name table

        and then drag the measure into visual level filter and set filter is not blank

         

         

         

        Best Regards,

        Lin