Reputation: 27
I am building a report in Power BI of my company's daily figures. Those figures are published each morning in an excel file to our company server. I would change the scripts that build this file, but at the moment that's not an option.
However, that file name has the date in it each day, so the filename CHANGES every day.
Essentially I am trying to use an expression for the excel query to include the system date in the concatenated filename each morning.
Upvotes: 0
Views: 4349
Reputation: 15037
Power BI's Queries can start by reading a folder of files (Get Data / Folder). It treats them as a table of data (one row per file).
You can then filter that table (e.g. Sort by Date modified, Keep Rows / Keep Top Rows / 1), before using the Combine Files button on the Content column - this will generate a function that will work against any file(s) allowed through your filters.
Upvotes: 2