Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
San_eve
Regular Visitor

Help with strings

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 2O/p
xyz_yzx_123Yes
def_cba_12No
dce_abc_123Yes
abc_11Yes
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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"
)

vcgaomsft_0-1687749914431.png

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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"
)

vcgaomsft_0-1687749914431.png

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

devanshi
Helper V
Helper V

Stringcontain =
FILTER(Table2, CONTAINS(Table1, Table1[ColumnName], Table2[ColumnName]))

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.