Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
Currently in Power Query, I import a xml-file for month 1 Region East and append xml-file for month 1 Region West, file for month 2 Region East, month 2 Region West and so on:
Instead of appending new files each month I want to import the entire folder with xml-files so that my report automtically import new xml-files whenever there are placed in the folder.
How can I do this without breaking my applied steps?
The beginning of my query looks like this:
Solved! Go to Solution.
Hello @Anonymous
- Create one query that does exactly what you need
- Create a parameter "FileName" and maintain one complete path as value
- Enter in the advanced editor and change the part of the filename like "C:\.....\example.xlm" with your parameter like Folder.Contentes(FileName)
- rightclick on your query and select "create function". Call it "fnGetData"
- add a new query that reads your folder
- apply a filter that only the files that you need are visilbe
- add a new column and enter the following = fnGetData([Folder Path]&[Name])
- Exapand table
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Hello @Anonymous
were you able to solve the problem with any reply given?
If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
All the best
Jimmy
Hi @Anonymous
Hello @Anonymous
- Create one query that does exactly what you need
- Create a parameter "FileName" and maintain one complete path as value
- Enter in the advanced editor and change the part of the filename like "C:\.....\example.xlm" with your parameter like Folder.Contentes(FileName)
- rightclick on your query and select "create function". Call it "fnGetData"
- add a new query that reads your folder
- apply a filter that only the files that you need are visilbe
- add a new column and enter the following = fnGetData([Folder Path]&[Name])
- Exapand table
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy
Hi @Jimmy801
Sorry for my late response due to christmas vacation.
Some questions regarding your suggestion below;
- By "one query.. exactly what I need" you mean one query with all of the applied steps including where I also append the other xml files? (picture 1)
- What does "maintain one complete path as value" means? How should I create the parameter? (picture 2)
pic1
pic2
Hello @Anonymous ,
no problem..
about your 2 questions:
no, create one query that processes only ONE xml file as you need it, without including any appending
create a parameter with the complete file path for ONE xml file, like that
the other steps as already stated in my solution
Hope this helps
Jimmy
Hi @Jimmy801
Im obviously doing something wrong:
I have created a more simple query to test. I then create a parameter with the xml-file in my folder (pic3) and tried to change the query in the advanced editor as you wrote (pic 4).
pic3
pic4
Hello @Anonymous
just delete the quotation marks that are surrounding the parameter
Jimmy
Did so and now it gives me
Hello @Anonymous
the query should treat an xml-file, but your query starts from a folder. So probably you have to remove also the function Folder.Contents from your parameter.. that it looks like Xml.Tables(Filename),
Jimmy
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.