Forum Discussion
Dynamic File Loading
In Power Query, create a parameter called FileStart or whatever you want to call it. In the query that is connected to the folder, filter it the file name Begins With then select parameter from ABC option and select FileStart. You need not add the asterisk if you're confident that no other files contain anything else after Test1, etc otherwise modify the M code of that step to something like
= Table.SelectRows(#"Name of Previous Step", each Text.StartsWith([Name], FileStart & "*"))
If you want to case-proof the filter, convert both your parameter and [Name] to upper or lower case in the Table.Select step
= Table.SelectRows(#"Name of Previous Step", each Text.StartsWith(Text.Upper([Name]), Text.Upper(FileStart) & "*"))
This wil ensure that the names will get filtered regardless of the text case use in FileStart or the names themselves.
First Thanks for quick Response
Can we pass selected Value here...
= Csv.Document(File.Contents("C:\Users\Myfolder\TestCase#1.csv"),[Delimiter=",", Columns=33, Encoding=1252, QuoteStyle=QuoteStyle.None])
Where Testcase#1 comes from Filter Dropdown
_____________________________________________
You response
= Table.SelectRows(#"Name of Previous Step", each Text.StartsWith([Name], FileStart & "*"))
Where I need to look for this.. Sorry for basic questions