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
PBIBharath
Regular Visitor

how to merge multiple tables

I have 15 tables, with the same column names , but different row values in each table.

how to combine these tables, so I can see all the row values in one single table.  

thank you

 

m2.PNG

17 REPLIES 17
MauriceMecowe
Resolver II
Resolver II

Use the append ability within Power BI to merge the tables. You can find it when you go to the "Edit Queries" screen under the Home tab.

 

Append.JPG

 

Hi Ruslan, I tried that but I'm getting some error. The columns values were duplicated and the row values are all over ..as below 

 

RESULT.PNG

Are the column types the same for both tables? Could you otherwise share the pbi file?

Hi Maurice, 

 

dont know how to share the file. This is how all the tables were created....

 

m1.PNG

 

 

m2.PNG

 

there is no ID or unique identifier, just model , manufacturer and weight ...but in 15 different tables.. ..I would like to combine them in one single sheet ... 

 

 

Hi PBIBharath,

 

Click Advanced Editor and check if step #"Appended Query" is like pattern below:

#"Appended Query"Table.Combine({#"Changed Type", Table2, Table3, ...}),

 

Regards,

Jimmy Tao 

let
Source = Table.Combine({#"Table 1", #"Table 1", #"Table 10", #"Table 11", #"Table 12", #"Table 13", #"Table 14", #"Table 2", #"Table 3", #"Table 4", #"Table 5", #"Table 7", #"Table 6", #"Table 8", #"Table 9"})
in
Source

Hi @PBIBharath,

 

Can you send us a Power Query (M) code of result query with applied append step? (Go to Advanced editor).

 

Regards,
Ruslan
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!

let
Source = Table.Combine({#"Table 1", #"Table 10", #"Table 11", #"Table 12", #"Table 13", #"Table 14", #"Table 2", #"Table 3", #"Table 4", #"Table 5", #"Table 7", #"Table 6", #"Table 8", #"Table 9"})
in
Source

 

output - 

 

to.PNG

Hi PBIBharath,

 

You can upload your pbix file to cloud storage such as dropbox and share the link here.

 

Regards,

Jimmy Tao

https://www.dropbox.com/s/omun01x5kgnk41q/exp.pbix?dl=0

 

Thank you Jimmy, please find the link 

@PBIBharathTable 9 is the issue, the header has space, fix the header without space and it will work.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thank you Parry, it worked prefectly. But how did you Indetify there is space in headers, beacuse when you look at the headers ...i couldnt say if there is a space or not, even while fixing it..I couldnt tell if there space ...i just clicked on backspace, delete few times ..saved the table ..and the Append worked just fine. 

 

did you Identified the space through M query in advanced editor? 

I was sure it has something to do with header. I did look at advanced editor to find out the issue. I also added a custom column in each table as table name to identify which table has the issue and table9 was the one which showed the rows going to different columns.

 

In your case it was easy to identify as each table has fewer rows but if it was bigger tables would have been tough, in that case that added column of table name should helped to identify the table.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thank you Parry. 

Hi PBIBharath ,

 

Could you please share a pbix file so that i can do further analysis?

 

Regards,

Jimmy Tao

Hi Jimmy, 

 

Can I attach the file here, I dont see any option. Otherwise I can send it to your email?

 

Thank you

Bharath

 

 

let
Source = Table.Combine({#"Table 1", #"Table 1", #"Table 10", #"Table 11", #"Table 12", #"Table 13", #"Table 14", #"Table 2", #"Table 3", #"Table 4", #"Table 5", #"Table 7", #"Table 6", #"Table 8", #"Table 9"})
in
Source

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.