Forum Discussion
Merging multiple csv files as importing to Power Bi
Did you know that behind the scenes both Append and Merge are served by the same Table.Combine statement?
Just use Append and trust Power Query to sort out the columns.
HOWEVER: for this to work the spelling of the column names has to be consistent. Remember that M code is case sensitive.
After the Table.Combine you want to use Table.SelectColumns rather than Table.RemoveColumns, for hopefully obvious reasons.
Thanks for your reply.
When we use 'combine' as you suggested, the files get appended and not merged. The column names are not consistent and should not be because I need to have them next to each other and not on the top of each other. Look below please: if you use append C1 will be on the top of D3 which does not make sense.
File 1:
| Date | C1 | C2 |
4/12/2019 | 5 | 6 |
| 1/3/2019 | 10 | 12 |
File 2:
| Date | D3 | D8 |
4/12/2019 | 4 | 6 |
| 1/3/2019 | 3 | 10 |