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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.