Power Query: Prompt to select file on query update


I have a powerquery import having a specific file as source.

When updating this query, is there a feature to have the query ask to select the file to be imported?

Thank you.


Christoph KümmekeHead of Group Controlling DACHAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think you need a parameterized custom function that passes the file name as an argument.
You don't say what type of files you are importing - PQ has different functions for various file types being imported.
Here is a very sparse custom function with File Name as Parameter for importing CSV files.
(FileName as text) =>
    Source = Table.FromColumns({Lines.FromBinary(File.Contents(FileName), null, null, 1252)})

Open in new window

Here is a blog from Ken Puls on sharing, a solution which is not quite what you want, but with some modification, should get you what you want.

Write back to describe types of files, and what you think the Ken's blog... we can go from there.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TracyVBA DeveloperCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.