Forum Discussion
Gerbil
2 years agoHelper I
Make a Table that Shows Mismatched Data?
Hi All,
So I have two tables that look like this:
| ID | Lat A | Long A |
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 3 | 3 | 3 |
| 4 | 4 | 4 |
| 5 | 5 | 5 |
| 6 | 6 | 6 |
| 7 | 7 | 7 |
| 8 | 8 | 8 |
| ID | Lat B | Long B |
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 3 | 2 | 3 |
| 4 | 4 | 4 |
| 5 | 5 | 5 |
| 6 | 6 | 6 |
| 7 | 7 | 8 |
| 8 | 8 | 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:
| ID | Lat A | Lat B | Long A | Long B |
| 3 | 3 | 3 | 2 | 3 |
| 7 | 7 | 7 | 7 | 8 |
Any help would be appreciated.
1 Reply
- devesh_guptaImpactful Individual
You can achieve this by merging the two tables and then creating a new column that checks for mismatches.
Merge the Tables: In Power Query, merge the two tables using the ‘ID’ column as the key .
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.