Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
deanbland
Helper III
Helper III

Making Power BI only look for part of a file name.

Hi, 

 

I have reports that I pull into Power BI that are updated monthly and am wanting to automate this. The problem I have is that the file name changes each month with the date the report was pulled attatched to the end (e.g. ProjectVarience_221020). How do I make it so that Power BI only looks for 'ProjectVarience' so that the files can be pulled through without my intervention? 

 

Thanks

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

@PhilipTreacy is correct, just note that to do this you would need to start from the Folder source instead of using a specific file.

 

But if you have an existing query that works with a single file you can create a new query using the folder, apply any filters and get to the point where you have selected the required file then you can copy the code from the advanced view and paste it into your existing query. But you would need to remove the first "Source=..." line from your original query and change the reference in the second line or your original query to use the last variable from the code you paste in. 

 

If you have trouble, just paste the two queries into this thread and I can show you how to merge them.

View solution in original post

2 REPLIES 2
d_gosbell
Super User
Super User

@PhilipTreacy is correct, just note that to do this you would need to start from the Folder source instead of using a specific file.

 

But if you have an existing query that works with a single file you can create a new query using the folder, apply any filters and get to the point where you have selected the required file then you can copy the code from the advanced view and paste it into your existing query. But you would need to remove the first "Source=..." line from your original query and change the reference in the second line or your original query to use the last variable from the code you paste in. 

 

If you have trouble, just paste the two queries into this thread and I can show you how to merge them.

PhilipTreacy
Super User
Super User

Hi @deanbland 

I presume you have a column with file names in it?  Use Text Filters -> Contains to filter what you need.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.