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
raymond
Post Patron
Post Patron

If value exists in one or multiple columns Then...

Dear Community,

 

a rather simple issue that I fail to solve. 

 

Initial Situation:

Two or more columns with URLs or a random Text as values.

 

Sought Output as a new column:

If either one of the columns URL oder Text contain the word "google" then insert "Google" in the Output Column.

The same applies to the other ones >>

URL oder Text contain the word "xing" then insert "Xing" in the Output Column

- URL oder Text contain the word "facebook" then insert "Facebook" in the Output Column

 

 

2018-02-11 18_41_41-Mappe1 - Excel.png

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @raymond

 

Try this Calculated Column. I think Power Query provides an easier way

 

Output =
IF (
    OR (
        SEARCH ( "Google", TableName[URL],, 0 ) > 0,
        SEARCH ( "Google", TableName[Text],, 0 ) > 0
    ),
    "Google",
    IF (
        OR (
            SEARCH ( "Xing", TableName[URL],, 0 ) > 0,
            SEARCH ( "Xing", TableName[Text],, 0 ) > 0
        ),
        "Xing",
        IF (
            OR (
                SEARCH ( "FaceBook", TableName[URL],, 0 ) > 0,
                SEARCH ( "FaceBook", TableName[Text],, 0 ) > 0
            ),
            "FaceBook"
        )
    )
)

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

Hi @raymond

 

Try this Calculated Column. I think Power Query provides an easier way

 

Output =
IF (
    OR (
        SEARCH ( "Google", TableName[URL],, 0 ) > 0,
        SEARCH ( "Google", TableName[Text],, 0 ) > 0
    ),
    "Google",
    IF (
        OR (
            SEARCH ( "Xing", TableName[URL],, 0 ) > 0,
            SEARCH ( "Xing", TableName[Text],, 0 ) > 0
        ),
        "Xing",
        IF (
            OR (
                SEARCH ( "FaceBook", TableName[URL],, 0 ) > 0,
                SEARCH ( "FaceBook", TableName[Text],, 0 ) > 0
            ),
            "FaceBook"
        )
    )
)

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.