Forum Discussion
Scheduled refresh error
Hi Anonymous ,
You should change all data sources to the same format as below:
let
Source = Excel.Workbook(File.Contents("xxxxxxxxxxxxx"), null, true),
It is by default when you load excel file to power bi desktop whether you use a local disk or a network disk.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
All data sources?
Do you mean I should also change
let
Source = Folder.Files("Path to the folder"),
into
let
Source = Excel.Workbook(File.Contents("Source path"), null, true),
Because that doesn't make a lot of sense since the files are not excel files but .txt files.
Only excel file it connects to is 1 query ( which doesnt show in the error ) and it has the same format as you wrote.
At first when I wrote that I recreated an excel file into PowerBI doesn't mean I am acctually linking to that excel file, instead I made querys just like in that excel file. These querys get data from .txt files, analytics cubes and a websource.
In my first post the error shows in queries from 1 to 15. These querys mostly has source to another query. For example query 1 source is query 14, query 2 source is query 14 and query 14 source is a .txt file that automatically updates every 1h:
let
Source = Folder.Files("Path to the folder"),So since I can't schedule a refresh for example to query 14 that connects to a .txt file that means my other querys that connect to query 14 obiously can't refresh either.
So now I don't understand why the error code says:
Query contains unsupported function. Function name: File.Contents
while the querys that were listed ( query 1-15 ) in the same error do not contain such function.