Forum Discussion
Compare text string between two tables (Not exact)
- Anonymous3 years ago
Hi TIGER8855 ,
You can create a calculated column as below in 'Table 1', please find the details in the attachment.
Column = VAR _t2col = CALCULATE ( MAX ( 'Table 2'[Column1] ), FILTER ( 'Table 2', IFERROR ( SEARCH ( 'Table 1'[Column1], 'Table 2'[Column1], 1, 0 ), 0 ) > 0 ) ) RETURN IF ( ISBLANK ( _t2col ), "No", "Yes" )Best Regards
Hi TIGER8855 ,
You can create a calculated column as below in 'Table 1', please find the details in the attachment.
Column =
VAR _t2col =
CALCULATE (
MAX ( 'Table 2'[Column1] ),
FILTER (
'Table 2',
IFERROR ( SEARCH ( 'Table 1'[Column1], 'Table 2'[Column1], 1, 0 ), 0 ) > 0
)
)
RETURN
IF ( ISBLANK ( _t2col ), "No", "Yes" )
Best Regards
- TIGER88553 years agoHelper I
Thank you Anonymous ! That worked. The solution provided was well written.
I have one more request if you could help which is related. I also need an additional column that uses the same concept against the same source data with the only difference that it also needs to filter against an additional column in Table2 that has either TRUE or FALSE in it. So if Column1 from Table1 has a match against the text string in Table2 Column1 AND Column 2 is TRUE then it would return a Yes in the new Column in Table1. If not it would return a No. Below is an example of the expected result for new Column:
Table1
Column1 Column AAA-1111 No BBB-2222 No CCC-3333 Yes AAA-1111 No DDD-4444 No Table 2
Column1 Column 2 AAA-1111 This is a sample FALSE Sample Data. EEE-5555. Testing TRUE Test of data CCC-3333. TRUE HHH-8888. FALSE - Anonymous3 years agoNot applicable
Hi TIGER8855 ,
You can create a calculated column as below similar to the previous one to get it:
Column = VAR _t2col = CALCULATE ( MAX ( 'Table 2'[Column1] ), FILTER ( 'Table 2', IFERROR ( SEARCH ( 'Table 1'[Column1], 'Table 2'[Column1], 1, 0 ), 0 ) > 0 && 'Table 2'[Column 2] = "TRUE" ) ) RETURN IF ( ISBLANK ( _t2col ), "No", "Yes" )Best Regards
- TIGER88553 years agoHelper I
Anonymous thank you! Worked perfectly.