Forum Discussion
Finding differences between tables
- 8 years ago
Hi DaneM123,
Based on my test, you should be able to follow steps below to compare two tables and pull out the rows that appear in one but not the other.
1. Use the formula below to create a measure(you will need to replace the bold with your real table names and column names).
Is Contained in Table 2 = IF ( CONTAINS ( Table2, Table2[Code], MAX ( Table1[Code] ), Table2[Code2], MAX ( Table1[Code2] ), Table2[Date], MAX ( Table1[Date] ) ), 1, 0 )2. Show the related columns from Table1 with which can be concatenated into a unique key on the Table visual.
3. Use the the measure to apply a visual level filter([Is Contained in Table 2] is 0) on the Table visual to show only the rows that appear in Table1 but not the Table2.
Here is the sample pbix file for your reference. :smileyhappy:
Regards
Hi v-ljerr-msft,
What if the content of the tables changed, meaning Table 1 suffered some value changes for an item that appears in both tables (i.e. assuming 1st line CMC ABT 1/1/2016 is not 50 anymore but 57), can you also please update the pbix addressing this query and showing these changes in the Difference table? it should look like below (having the change in the first line highlighted like the +7 difference):
Many many thanks!