Forum Discussion

Gerbil's avatar
Gerbil
Helper I
2 years ago

Make a Table that Shows Mismatched Data?

Hi All,

 

So I have two tables that look like this:

IDLat ALong A
111
222
333
444
555
666
777
888

 

IDLat BLong B
111
222
323
444
555
666
778
88

8

 

And I want to make a dashboard that displays IDs that have mismatching lat long data between these two tables. So I would have an output like this:

 

IDLat ALat BLong ALong B
33323
77778

 

Any help would be appreciated.

1 Reply

  • devesh_gupta's avatar
    devesh_gupta
    Impactful Individual

    Gerbil 

    You can achieve this by merging the two tables and then creating a new column that checks for mismatches.

    1. Merge the Tables: In Power Query, merge the two tables using the ‘ID’ column as the key .

    2. Create a New Column: After merging, create a new column in Power BI to check for mismatches. You can use an IF statement to compare the ‘Lat’ and ‘Long’ values from both tables. Here’s an example of how you might do this: 

     

    NewColumn = IF(Table1[Lat A] <> Table1[Lat B] OR Table1[Long A] <> Table1[Long B], "Mismatch", "Match")

     

    • Filter the Mismatches: Now, you can filter the table on this new column to only show rows where there is a mismatch.

    If you find this insightful, please provide a Kudo and accept this as a solution.