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 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
Many thanks for the reply, I've tried a test version this morning and that seems to work so I'll try it on the big tables today.