Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am using a from folder query to identify folder names to be used as a source from a parameter.
However, when the .pbix is refreshed, the new folders added to the location are not shown in the parameter?
I am not sure why it is not using the source query when it seems to be refreshed.
I am using folders in C:/Temp, and every time I add a folder, it appears in the data in the table, but not in the parameter as a choice.
Power BI File link:
Filename Size URL Expires at
forumfile.pbix |
19.70 KB |
https://tmpfiles.org/dl/3324034/forumfile.pbix |
2023-12-08 05:43 UTC |
Any help appreciated.
let
Source = Folder.Files("C:\Temp"),
#"Removed Other Columns" = Table.SelectColumns(Source,{"Folder Path"}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Removed Other Columns", "Folder Path", Splitter.SplitTextByDelimiter("\", QuoteStyle.Csv), {"Folder Path.1", "Folder Path.2", "Folder Path.3", "Folder Path.4"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Split Column by Delimiter",{"Folder Path.3"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns1",{{"Folder Path.3", "Folder Name"}}),
#"Folder Name" = #"Renamed Columns"[Folder Name]
in
#"Folder Name"
The main input comes from the solution provided by Patrick LeBlanc in the following youtube video: https://www.youtube.com/watch?v=Z0U9UL9ORh8 .
You need use a parameter and make the first script into a function. The first parameter inout for the trial script should be the text you need to pull in the first data: Folder1
When you've created the function you need a table to which you can add a column. Whereby there's a column value that you can use as a parameter. Reading your question you could use the data your already loading, because the file names are included in that data.
You could then use the column with the Folder as the parameter input. To do this add a new function column
Let's name this column input. You can then add a new function column. (Example in dutch)
It will ask for an input column.Just chose the just created column we called input. This will add a table for every row. The last step would be to click expand. This should get you a table with all your data.
Patrick LeBlanc explains this using NFL data. I already used this solution multiple times for reading data from maps.
Hope this helps
Thanks for this, however it didn't work or wasn't quite the solution for my issue.
My problem is demonstrated in this video I prepared.
Video showing the exact issue: https://www.youtube.com/watch?v=c-HOeucry3s
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
8 | |
7 | |
6 |