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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Find the strings/ text's which are not in column 2

Hello Power BI Community,

 

I have a small question regarding the Matching one. I have a 2 columns and I want to compare 2 columns and get in a new column mentioning which all are present in both the columns should  be stating in new column that yes/ Ya something. If the numbers are not common in both the columns then should epresent No.

 

Please remember that both the columns are from different sources, but linked with another column

 

Could anyone help me in this?

 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous,

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hello CST,

 

Sorry that I cannot share the file as its confidential, but I can write it here

 

Source 1                    Source 2

HAWB (Column 1)    House Bill of Landing (Column 2)

123456                      123456

123456                      146788

134789                      164960

146788                      154860

146788                      158679

158679                      241638

 

So now I want to see the common things b/w these 2 columns with HAWB number in visualization and which column they are coming from (Column 1 or 2`?) which are of different sources but in one PBI. 

Anonymous
Not applicable

HI @Anonymous,

You can create a measure formula to extract the relationship key value as variable and use it as condition to look up two table field values, get the flag based on compare results.

 

flag =
VAR currID =
    SELECTEDVALUE ( Table1[Key] )
VAR hawb1 =
    LOOKUPVALUE ( Table1[HAWB], Table1[Key], currID )
VAR hawb2 =
    LOOKUPVALUE ( Table2[House Bill of Landing], Table2[Key], currID )
RETURN
    IF ( hawb1 & hawb2 <> BLANK () && hawb1 = hawb2, "Y", "N" )

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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