Forum Discussion

PeraZo's avatar
PeraZo
Helper I
3 years ago

Merging different column name when Importing from Folder

Hello Power BI Community!

 

I have 3 csv files in 1 Folder.

2 csv file are the same column name but 1 csv file have a different column name for a column.

 

Below is 1 csv file where column E have different name "Forecast1" compared to "Forecast".

 

When imoprting the Folder and combining these 3 files, since 1 csv file have different name, it outputs "null".

Is there anyway I can combine the data?

It is just the column name that have changed and the order of the column are same.

 

Thank you ina advance for looking by question.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PeraZo ,
    Below are the 2 solutions you can try:
    1. In the Power Query Editor, you can rename "Forecast1" to "Forecast" and then append the 3rd CSV file

    2. Rename "Forecast1" to "Forecast" in the CSV file itself

     

    Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

  • Thank you. Since there are several files. I want to do this within Power Query. But in the PowerQuery Editor when importing the Folder, where could I put in the query to change the column name? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi PeraZo ,
      What you can do is pull the 3 CSV files separately instead of Folder and then rename the 3rd CSV's column.
      After that, you can use the append functionality of Power Query Editor and you will be able to view the combined file with all 3 CSV data.

       

      Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!