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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Vrykolakas
Frequent Visitor

How can I combine different CSV files ( with different shemas ) in my dataflow creation

Hi All !

I'm struggling with this task currently during my Dataflow creation in my pbi service.

So I have a few csv files ( They all contain how many App installs have been - on a daily basis - in each country ), They are stored in a Sharepoint Folder.

  • File1.csv is structured as followed " Date |  All Country installations | Country 1 installations | ..... | Country 9 installations "
  • File2.csv is structured as followed " Date | Country 10 installations | Country 11 installations | ..... | Country 15 installations "
  • and the upcoming files also obey the same logic, starting with the column " Date " followed by other countries..

The point is to combine these files, and do some reporting.. But Here is where I feel lost. 

I would really appreciate your guidance, to help me find an optimal way to digest these files.

 

Thanks !

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. Assuming you have one date column and a lot of countries. You might need load each csv manually, because it doesn't look like a combine or append solution. It sounds like a merge/join one. The example data makes me think you need to match files by date and one you have all the countries, unpivot the countries to build a country column and a value for their values.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Vrykolakas ,

 

Looks like merge queries.

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-shape-and-combine-data#combine-querie... .

The point is will the [All Country installations] changed after the tables being merged?

If the [All Country installations] is the sum of country installations, you may need to add a custom column after the tables being merged.

 

Best Regards,

Jay

ibarrau
Super User
Super User

Hi. Assuming you have one date column and a lot of countries. You might need load each csv manually, because it doesn't look like a combine or append solution. It sounds like a merge/join one. The example data makes me think you need to match files by date and one you have all the countries, unpivot the countries to build a country column and a value for their values.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Thank you @ibarrau for your helpful comment !

 

I currently dispose of these two csv files : ( But more files will be added in the future, each with the Date column, and different countries ( I should also take care of the possibility that some countries might be redundant.. and a "Note" column, that should be deleted in the process ) :


2021-10-29_12h32_07.png2021-10-29_12h32_00.png

So the option of merging two Queries, might not be very optimal, since I need to Query each new added csv file in my sharepoint..

 

Is there a way to unify the structure ( in the Tranformation file part ), by transposing all the country fields into one Column " Country " and another one for the " Installs" values ? Because When transforming one file, the other file shows up an error, since the columns don't match.. How can I fix this part ?

@Anonymous, Hi ! Thank you for your comment, I think this also answers your question, and gives better explanation as my initial post 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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