Posts

Configuration of Power BI Gateway Data Sources For Files And Folders

Image
Recently I’ve been building a lot of Power BI reports from csv and Excel files, and to make sure that scheduled refresh works I have been setting up data sources in an On Premises Data Gateway (what used to be called the Enterprise Gateway). I had assumed that if I was connecting to file-based data sources in my Power BI dataset then, in the gateway, I would need to set up one data source for each file that I’m connecting to – which is a bit of a pain. In fact it turns out that you can set up a gateway data source for the folder that the files are in instead. Let me give you an example. Imagine that you have three Excel files in a folder called C:\Sales Data: Now imagine that you have three queries in Power BI that get data from these three files: Here’s an example of the M code for one of these queries: 1 2 3 4 5 6 7 8 9 let     Source =         Excel.Workbook(   ...