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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
94veiga
Helper II
Helper II

Append to tables with different size using directquery

Hi guys! I have two tables imported from SQL using direct query and I'm not able to append them.  These tables have some columns in common but others are different. I want to obtain an unique table with all the columns (the ones in common and the ones that are different). Example:

 

Table 1 (headers)                                    Table 2  (headers)                 Result (headers)

Year Song Album Singer         Year Film Director Actor Price             Year Song Album Singer Film Director Actor Price

 

Thank you in advanced!!!

6 REPLIES 6
94veiga
Helper II
Helper II

I finally got it with an SQL query before I put the data in. Thank you so much for all your time.

negi007
Community Champion
Community Champion

@94veiga You could try the solution from below link as well since you are trying to combine tables using directy query method

 

https://community.powerbi.com/t5/Desktop/DirectQuery-append/td-p/18122




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Is it possible to join tables by query without having the same number of columns?

Thanks a lot!!

amitchandak
Super User
Super User

@94veiga , I doubt you can append in direct query mode. are you using import mode?

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

No, I'm using DirectQuery Mode because the table is very large in size and makes the file size very large so it wouldn't let me publish it.

negi007
Community Champion
Community Champion

@94veiga 

 

Open your power query window and select both the tables then Option Append queries as new. You can also use below code in your power query window to directly merge tables.

 

let
Source = Table.Combine({Mus_Tab1, Mus_tab2})
in
Source

 

Below is the output

negi007_0-1601459350562.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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