Forum Discussion
DataSource.Error: Could not find file...
- 9 years ago
Hi Jim_,
Please click the file->Options and Settings->Data Source Settings, you will get the following data source settings navigator. Then select change source(highlighted in red line), please check the path and open file as right format.
what's your data soure? I post an example using .xls file above. Please check if it works fine. Please share more details if you have still find other issue.
Thanks,
Angelia
You can wrap anything in M with a "try <whatever you are trying to do> otherwise <do something else>"
Not exactly sure how to implement in your situation, but maybe there is a way to have PBI ignore the cases where the file is missing (and throws and error).
Thanks for the quick reply. I'm including parameters for the root folder (i.e. full data set), and the below file ('filename.csv') won't always be present in the data sets, so I'm looking for an alternative to disabling this query when the file is missing since that would cause all my measures to disappear in my template. Any solution that would allow the other queries to run successfully would work for me, as the end user will just delete the tabs in the report that pull from this source.
Source= Csv.Document(File.Contents(#Source & "\filename.csv"),[Delimiter=",", Columns=11, Encoding=1252, QuoteStyle=QuoteStyle.None])