Forum Discussion

Gangula's avatar
Gangula
Advocate II
8 years ago

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

  • 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.