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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
bhupen14
New Member

How to merge multiple columns

Hello All,

 

I have two files, In one file there are two columns which has same values, few of them are not matched.

I want to do vlookup to those columns values with values in another file but not able to do.

 

Normally to get the correct data, I am applying Vlookup in files1 for column 1 with file 2 column 2 values and for pending cells I am applying vlookup in files1 for cloumn 2 with file 2 column 2 values.

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @bhupen14 ,

 

One solution using DAX.

Please kindly refer to this article. The main measure is like

 [Is this company a metals company] =

  =IF(
      SUMX(MatchList,
           FIND(
                UPPER(MatchList[Keyword]),
                UPPER(Companies[Company])
                ,,0
               )
          ) > 0,
      “YES!”,
      “Probably Not”
     )

 

 

Another solution using Query Editor.

 

1. Left Outer Join

2. Conditional Column.

 

See the attached screenshots.

1.PNG

LEFT OUTER JOIN

2.PNG

EXPAND COLUMN

3.PNG

CONDITIONAL COLUMN

4.PNG

FINAL OUTPUT

 

Reference: MATCH between 2 tables

 

Best Regards,

Stephen Tao

 

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-stephen-msft
Community Support
Community Support

Hi @bhupen14 ,

 

One solution using DAX.

Please kindly refer to this article. The main measure is like

 [Is this company a metals company] =

  =IF(
      SUMX(MatchList,
           FIND(
                UPPER(MatchList[Keyword]),
                UPPER(Companies[Company])
                ,,0
               )
          ) > 0,
      “YES!”,
      “Probably Not”
     )

 

 

Another solution using Query Editor.

 

1. Left Outer Join

2. Conditional Column.

 

See the attached screenshots.

1.PNG

LEFT OUTER JOIN

2.PNG

EXPAND COLUMN

3.PNG

CONDITIONAL COLUMN

4.PNG

FINAL OUTPUT

 

Reference: MATCH between 2 tables

 

Best Regards,

Stephen Tao

 

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

 

watkinnc
Super User
Super User

I would do a left join, which you can do right in the Power Query GUI, or you can paste this in into the formula editor (after changing it to your own table/column names):

 

= Table.Join(PriorStepNameOrCurrentTableName, {"column 1'}, OtherTableName, {"column 2"}, JoinKind.LeftOuter)

 

Same for your "pending" cells:

 

= Table.Join(PriorStepNameOrCurrentTableName, {"column 2'}, OtherTableName, {"column 2"}, JoinKind.LeftOuter)

 

--Nate

 


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors