Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have two tables. One like below with unique values up to 300 rows.
| Table 1 |
| xyz |
| abc |
| dce |
I have another table table 2 with text column like below.
| Table 2 |
| xyz_yzx_123 |
| def_cba_12 |
| dce_abc_123 |
| abc_11 |
I need o/p if the column in table 2 contains the strings in table 1. The o/p must be. I can do it with if and or but I have to manually enter 300 values. Hoping there is an easy way. Thanks.
| Table 2 | O/p |
| xyz_yzx_123 | Yes |
| def_cba_12 | No |
| dce_abc_123 | Yes |
| abc_11 | Yes |
Solved! Go to Solution.
Hi @San_eve ,
Please create a new calculated column:
Column =
IF (
SUMX (
'Table 1',
IF (
SEARCH ( 'Table 1'[Column1], 'Table 2'[Column1], 1, 0 ) > 0,
1,
0
)
) > 0,
"Yes",
"No"
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @San_eve ,
Please create a new calculated column:
Column =
IF (
SUMX (
'Table 1',
IF (
SEARCH ( 'Table 1'[Column1], 'Table 2'[Column1], 1, 0 ) > 0,
1,
0
)
) > 0,
"Yes",
"No"
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Stringcontain =
FILTER(Table2, CONTAINS(Table1, Table1[ColumnName], Table2[ColumnName]))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 11 | |
| 9 | |
| 5 | |
| 5 |