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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sanjanarama
Resolver I
Resolver I

multiple values in a column comparison

I have two tables as below with common attribute as ID.

I wanted to compare names column from two tables if they match or not. Data in the columns are comma seperated values and can be present anywhere, 

IDparent Names
1Apple, Orange
2Lemon,grapes, Fruit
3Hello, Fridge, Door
4balcony
6tree, time

 

IDFamily Names
2Fruit, Lemon, Grapes
3fridge, hello, Door
6tree



Outcome :

IDMatch result
1no match
2true match
3true match
4no match
6partial match





1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @sanjanarama ,

 

For this kind of output, judging by looping through the string may not be possible in powerbi. However, you can use a function like find to find out if the corresponding field exists in the list.

1 = 
IFERROR ( FIND 
    ( "Apple", 
        Table1[parent Names] ), 
            BLANK () 
    )
    && 
    IFERROR ( FIND 
    ( "Orange", 
        Table1[parent Names] ),
             BLANK () )

vhenrykmstf_1-1655278052391.png


Best Regards,
Henry


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

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @sanjanarama ,

 

For this kind of output, judging by looping through the string may not be possible in powerbi. However, you can use a function like find to find out if the corresponding field exists in the list.

1 = 
IFERROR ( FIND 
    ( "Apple", 
        Table1[parent Names] ), 
            BLANK () 
    )
    && 
    IFERROR ( FIND 
    ( "Orange", 
        Table1[parent Names] ),
             BLANK () )

vhenrykmstf_1-1655278052391.png


Best Regards,
Henry


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

HenriqueReis
Resolver I
Resolver I

Hi!

 

If you want three types of results, first of all, you should separate the columns in just one item. 

Since the table has comma seperated values, you could open Power Query and separate by delimiter.

 

Then will be easier to do what you want.

 

Regards!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.