Forum Discussion
How to merge multiple CSV with different format?
I have daily spending data in CSV files in several formats.
How can I extract the columns I need, and merge all of them for the power BI analysis?
We have 3 purchasing systems, each system generates daily spending file in different formats.
For example,
CSV1: Supplier, Product, Price, Quantity, Amount, Date, ...
CSV2: Date, Product, Price, Quantity, Amount, Supplier, Category, Project Code,...
CSV3: Date, Product, Price, Quantity, Amount, Department,...
We want to extract Date, Product and Amount from each file, and merge them into 1 file, so that it can be used for analysis and available for refreshin Power BI.
Can anyone tell me how to do this?
Hello,
create a query for the first CSV file, edit and remove the columns for Supplier, Price and Quantity and move the Date column to the left.
Create a query for the second CSV file, remove the columns you don't need.
Create a query for the third CSV file, remove the columns you don't need. Then append the first query and then append the second query.
Close and apply.
2 Replies
- teylyn
Advocate III
Hello,
create a query for the first CSV file, edit and remove the columns for Supplier, Price and Quantity and move the Date column to the left.
Create a query for the second CSV file, remove the columns you don't need.
Create a query for the third CSV file, remove the columns you don't need. Then append the first query and then append the second query.
Close and apply.
- JinjiFrequent Visitor
Thank you very much!! Just tried and it worked!!