Do you want to create a Power BI Report that gets a daily scheduled refresh of data from a Sharepoint csv file?
The first step is to create your Power BI report in Power BI Desktop using the Sharepoint csv file as data source.
In Power BI Desktop use Get Data – File – Sharepoint Folder to connect to your Sharepoint Folder.
The resulting dataset query (Power Query) will look something like mine below. You will replace “mydomain” with your Sharepoint account name or domain.
You will also replace “datafile.csv” with your csv file name. The Power BI connection is to a Sharepoint folder which might have more than one file like I did. If you have only one file in the folder the filter will be redundant but can’t hurt.
let Source = SharePoint.Files("https://mydomain.sharepoint.com", [ApiVersion = 15]), #"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "datafile.csv")), #"Combined Binaries" = Binary.Combine(#"Filtered Rows"[Content]), #"Imported CSV" = Csv.Document(#"Combined Binaries",[Delimiter=",", Columns=11, Encoding=1252, QuoteStyle=QuoteStyle.None]), #"Promoted Headers" = Table.PromoteHeaders(#"Imported CSV") in #"Promoted Headers"
After you publish your report to your Power BI Online account you can select your newly uploaded dataset’s “Schedule Refresh” property where you can set up the refresh schedule.
First go to “Gateway connection”.
I selected “Connect Directly” which requires that you also enter Sharepoint credentials in the “Edit credentials” link which pops up a web page that prompts you to login into your Sharepoint account. This gives Power BI Service permission to access your Sharepoint account to refresh file.
If you have an enterprise gateway setup you could try “Enterprise Gateway” and enter the required credentials for that.
If you entered credentials correctly you should now be able to select the “Keep your data up to date” switch to “Yes”.
Then you can select which four 6-hour window you want refresh to run. Power BI Service free accounts can do daily refreshes. Pro accounts can have hourly updates.
As an aside be warned that if you click the “Try Pro for free” button you might get a blocking message that you are using Pro feature. This happened to me and was clearly a quirky error. I had to delete my report and dataset and re-upload them and redo the scheduling to get rid of the error.
You can try refreshing the dataset manually (On demand) or wait for the next scheduled refresh (Scheduled) to happen to see if the data does refresh. You can see refreshes are successful and when they ran by clicking the “refresh history ” link.