cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mleepin Regular Visitor
Regular Visitor

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

Accepted Solutions
Super User
Super User

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

Hi,

 

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

Super User
Super User

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

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.


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

Proud to be a Datanaut!


6 REPLIES 6
Super User
Super User

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

Hi,

 

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

Super User
Super User

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

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.


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

Proud to be a Datanaut!


mleepin Regular Visitor
Regular Visitor

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

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.
mleepin Regular Visitor
Regular Visitor

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

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.

nirvana_moksh Established Member
Established Member

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

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

 

mleepin Regular Visitor
Regular Visitor

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

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

 

Regards,