Forum Discussion
krishnakumar_Ra
Helper I
1 year agoDynamic File Loading
I have a filter.. (values Test1 and Test2) Folder has base files starting with Qualifier Test1*.csv or Test2*.csv If I choose Test1, PBI should load all the files start with Test1*.csv... Like wise...
Kedar_Pande
Super User
1 year agoIn power query, create a Parameter for the Filter.
Go to Home > Get Data > Folder, and select the folder where the Test1*.csv and Test2*.csv files are located.
In the Power Query Editor, use the parameter to filter the Name column in the folder contents.
Select the Name column.
Go to Home > Keep Rows > Keep Rows Where > Begins with.
In the dialog, type FilePrefix & "*" to dynamically filter files that start with the value of FilePrefix.
Add Custom Column
if Text.StartsWith([Name], FilePrefix) then [Content] else null
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
krishnakumar_Ra
Helper I
1 year ago
I need to select all Testcase#1 files from the folder.. Can you share me where I need to make the change.. in PQ