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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mleepin
Helper I
Helper I

Combining files in Power BI (appending or union all equivalent)

Hello,

 

I have a question re: combining some data sets and I am hoping someone could please advise?

 

I need to combine 5 different tables in power bi, potentially these will be in an xls / csv format prior to loading.

 

The columns in each of the tables are the same but not all tables will have the same combinations of columns (see eg screen shot below and explanation next )-

 

  • Table 1 will have the complete combination of all columns
  • Table 2 will have fewer columns than table 1
  • Table 3, 4, 5 will have fewer columns that table 2.

 

I realise these could be combined using a union all in sql with place holders added  where required  in the select statements so that the quantity of columns in tables 2, 3,4,5 match table 1 which has all columns.  Would there be a way to do something similar whilst loading the data via power query.  I realise there is an append function  - but does having a different quantity of columns in each table create issues?

 

 

table 1       
        
ABCDEFG 
        
table 2       
ACEFG   
        
table 3       
ABFG    
        
table 4       
ABFG    
        
table 5       
ABFG    

 

 

Regards  & thanks

 

  ML.

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

 

In the Query Editor, the append feature should work without any problem.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Greg_Deckler
Super User
Super User

Generally now, with Append, common columns will get appended and any columns missing or added between files will be added as appropriate with blanks for the row/column coming from the file without that column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

Generally now, with Append, common columns will get appended and any columns missing or added between files will be added as appropriate with blanks for the row/column coming from the file without that column.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Ashish_Mathur
Super User
Super User

Hi,

 

In the Query Editor, the append feature should work without any problem.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you this will potentially need to be done for a very large dataset/s knowing that this can be done is great I have done a quick test and this is ok as advised.

Just out of curiosity did appending large data set files (including SQL data source related files) take super long for you?

 

No real problems with this as yet because the sources are still relatively small (>10K records).

 

Regards,

Thank you this will potentially need to be done for a very large dataset/s knowing that this can be done is great I have done a quick test and this is ok as advised.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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