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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

transform each file the same way before merge

Hello, let's suppose I have many files in the folder (daily added).

All these csv have the same structure. 

So I need to apply the same power query transformation to each file before I can marge them: filter, delete columns, pivot, fill down, rename, unpivot...

Could you please tell me how to proceed whrite the M code - to apply these transformations to each file separatly before combining them.

 

Than you

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

If you use SharePoint folder connector or Folder connector to connect to multiple files, when you combine files, you will select a sample file like below. After combining, the structure of queries will be changed like below. You just have to edit the Transform Sample File query. Then all changes will be applied to the combined data in Query1. 

21122104.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

If you use SharePoint folder connector or Folder connector to connect to multiple files, when you combine files, you will select a sample file like below. After combining, the structure of queries will be changed like below. You just have to edit the Transform Sample File query. Then all changes will be applied to the combined data in Query1. 

21122104.jpg

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

watkinnc
Super User
Super User

You can just do your transforms on the transform sample file and then they'll apply to all of your tables before you combine them.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors