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.
Hello,
I have profit and loss data stored in separate Excel files. Each file is the same in structure so I thought I'd use a 'from folder' query. The basic structure is shown below:
What I want to achieve is create a column for the Company Name (always in cell A2) and a column showing end of month (always in A3). Is this possibe with a folder query?
Thanks in advance,
Mark
Solved! Go to Solution.
Thanks very much. I ended up with VBA where I could record the query and then do everything else and the output is saved into the folder.
Yes but it woudl help alot if the data was in the format of table with the information represented as columns in the data table (may require it)
Company Month DATA Item
ACME 6/1/2018 A 1
Thanks for the reply, I can use Power Query transforms to set up an individual file as a table and that works great. When I apply the transforms to a folder then the additional columns I have created for company name and date show the date and the company name and date for the latest file added, overwriting the entire company name column with that value.
I'm thinking that the from folder query option will only work with specific transforms but I'm trying to confirm this.
Cheers,
Mark
To make this work for multiple files from a folder, you have to transform your query into a function and apply that to all rows of the from-folder-table:
video: https://www.youtube.com/watch?v=Ar_fV_oXSNs
blogs: https://blogs.msdn.microsoft.com/mvpawardprogram/2013/08/19/creating-power-query-functions/
https://www.mattmasson.com/2014/11/converting-a-query-to-a-function-in-power-query/
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Sometime back, I created few Custom Functions in Excel that could pull cell values from Multiple Closed Workbooks
http://www.excelnaccess.com/connect-multiple-workbooks/
But I prefer to use Power Query as well
Thanks very much. I ended up with VBA where I could record the query and then do everything else and the output is saved into the folder.
Glad to hear that. You may help accept the solution above. Your contribution is highly appreciated.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |