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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jinji
Frequent Visitor

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?

 

 

 

 

 

 

1 ACCEPTED SOLUTION
teylyn
MVP

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. 

View solution in original post

2 REPLIES 2
teylyn
MVP

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. 

Jinji
Frequent Visitor

Thank you very much!!  Just tried and it worked!!

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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