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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Combine Two excel files with different column names and different amount of columns

Currently, I am receiving excel files from two different sources. I want to combine them for analysis on Power BI. However, because these reports are generated differently, the column/header names in the sheets are completely different and not all data would be present in both reports. For example, 

 

A

Account Manager                  Location                      Account Number               Sales

Jay                                          New York                                  1                         100000

 

B

Location Name                      Sales                                  Date                      Notes                Manager 

Philadelphia                            200000                             10/23/2019           improved          Adam

 

Account Manager=Manager, Location=Location Name, Sales=Sales

Date, Account Number, Notes are all unique categories 

 

I want a final dataset with the two reports combined and then the missing values would just be null/empty. 

 

Something like this:

 

 

 

help.jpg

 

 

How would I get the above submitted in as the data in order to create reports on Power BI?

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

Hi @Anonymous,

You can use try to use combine function to achieve your requirement:

let
    Source = Table.Combine({T1, Table.RenameColumns(T2,{{"Manager","Account Manager"},{"Location Name","Location"}})})
in
    Source

11.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

You can use try to use combine function to achieve your requirement:

let
    Source = Table.Combine({T1, Table.RenameColumns(T2,{{"Manager","Account Manager"},{"Location Name","Location"}})})
in
    Source

11.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
labuser1235
Helper IV
Helper IV

You can do it easily in power bi edit queries. 

Change the column names in table 2 as per your requirement and re-arrange the order of the columns. 

After that, in Edit queries --> Home --> Click on Append Queries. Click on two tables and select table1. 

You will get your desired output then click on close and apply. 

snip.PNG

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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