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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
lilpumpkini
New Member

Identify whether value in string matches values in another table

Hi

I have a table called Group that has a concatenated list of Div Codes in a field called Open Divisions

ClientOpen DivisionsIn Scope
1EMYes
2AB, DE, PO, LMYes
3IJ, MN, STNo
4CG, XY, LMYes

 

I have another table called In Scope that has a list of Div Codes

In Scope Table

Div Code
EM
AB
FB
CG

 

I want to create a calculated column on the Group table where if one of the div codes listed in the string of "Open Divisions" matches any of the div codes in the Div Codes column of the In Scope Table, it should say Yes, Otherwise No.

 

 

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @lilpumpkini 

 

Use this DAX to create that calculated column:

In Scope Check = 
VAR OpenDivisionsList = SUBSTITUTE([Open Divisions], ", ", "|")
RETURN
IF(
    COUNTROWS(
        FILTER(
            'In Scope',
            SEARCH('In Scope'[Div Code], OpenDivisionsList, 1, 0) > 0
        )
    ) > 0,
    "Yes",
    "No"
)

 

Output:

VahidDM_0-1717734919061.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

View solution in original post

3 REPLIES 3
VahidDM
Super User
Super User

Hi @lilpumpkini 

 

Use this DAX to create that calculated column:

In Scope Check = 
VAR OpenDivisionsList = SUBSTITUTE([Open Divisions], ", ", "|")
RETURN
IF(
    COUNTROWS(
        FILTER(
            'In Scope',
            SEARCH('In Scope'[Div Code], OpenDivisionsList, 1, 0) > 0
        )
    ) > 0,
    "Yes",
    "No"
)

 

Output:

VahidDM_0-1717734919061.png

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn | Twitter | Blog | YouTube 

Thanks so much, really appreciate it!

glad it helped

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.