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
Mat42
Helper III
Helper III

Automatically Gather Extra Data

I've searched for an answer, but haven't yet found anything useful. If this is a duplicate question, let me know.

 

I've been tasked with producing a report from a Sharepoint folder of identically formatted sales manifests. The information contained within the documents will obviously be different, but the document layout is identical. This means that the transformation process for each document will also be identical. However, the number of documents within the folder will increase as time goes by, so this will mean adding these new documents to the report.

 

I'm aware of the process of copying the code for the transformation steps in a query and pasting them into a new query, but is there a way to automate that process?

 

As an example: imagine I have 4 documents in the folder and I set up identical data transformations to get them into a format that PBI can utilise. I then append the resulting tables together to form a master table. At present, if 2 more documents are added to the folder I have to manually add those documents to the report by using the above mentioned 'copy/paste' of the transformation steps.

 

Can I automate this? Can I create a set of transformation steps, pull all documents from a folder, then apply those steps to every document?

 

It's the sort of thing that I can automate easily within Excel using VBA, but am not familiar enough with PBI to known where I'd start.

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Mat42 yes, you don't need to manually add new documents in PQ, you just need to reach the folder and process all the files. Check this awesome post.

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@Mat42 you add a new column, pass content to your transformation function, and that your function will return a table and then you expand it. check this another post

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Mat42 yes, you don't need to manually add new documents in PQ, you just need to reach the folder and process all the files. Check this awesome post.

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks for your help and really quick reply 😊.

 

So, I connect to the folder and can list of documents within the folder. How do I go about performing the same transformation steps on every document? I can see the combine option, but the files need a lot of transformation before they're combined. 

 

Sorry if that's an obvious question.

Ignore the above. I got it all sorted, thanks. I spent 2 days trying to working out why it wasn't working and it turns out that the data I was pulling through was dated incorrectly so at first (and second, third, fourth etc) glance, it looked like the same data being pulled through multiple times when, in actuality, it was the correct data just with the wrong date on it.

 

And, apologies for the delay in replying.

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.