Forum Discussion
Use Filename to filter a column
I have a file which has a lot of data. I would like copy this file into many locations and rename it differently. Based on the name of the File, I would like the query to filter out the data.
So I want power query to filter the desired data just by renaming the file.
7 Replies
- Seward12533Solution Sage
Seems tedius but should work. Will probably work best if you keep the same name for the one you want imported into your model and just delete this and copy another one and then rename the copy.
You could also use a PARAMETER in PowerQuey to just specify the name of the file you want to import and modify the M to use the file name from the PAMAETER you define.
- GangulaAdvocate II
I would like to know how to create the parameter and use it in the Advanced editor. I don't seem to find a way to create a filename parameter.
- v-yuta-msftCommunity Support
Hi Gangula,
This blog may help you: https://accessanalytic.com.au/powerquery_namedcells_parameters/.
Regards,
Jimmy Tao