Forum Discussion
bloigge
11 years agoAdvocate IV
Refreshing queries with functions doens't work
Does anyone else experience that refreshing on-premise data via a gateway (for example amount of files in a folder) works if you hardcode the path to the folder, but when you create a function where ...
- 11 years ago
Maybe try this approach..and filter the latest file by date created..Needs more code but it worked - refreshed in PowerBI V1 so probably it will work in V2 as it doesn't use parameters..
lubosbednar
11 years agoHelper I
I experience exactly the same problem. When I use hardcoded path (local or OneDrive for Business), it allows me to configure refresh. However, when I use function which returns me file according to path specified dynamically, the refresh cannot be configured.
Function:
let GetSheet = (path as text, SourceType as text) => let Source = if SourceType = "web" then Excel.Workbook(Web.Contents(path)) else Excel.Workbook(File.Contents(path)),