Forum Discussion
Anonymous
6 years agoNot applicable
Connect Powerbi to Github
I am trying to load a github repo into powerbi ( https://github.com/Laila92/COVID-19/tree/master/csse_covid_19_data) I followed this tutorial (https://thinkaboutit.be/2018/03/connect-to-github-micro...
- 6 years ago
Hi Anonymous ,
We can create a blank query and use following query in Advanced Editor to meet your requirement:
let Source = List.Dates(#date(2020,1,22),Duration.Days(DateTime.Date(DateTime.LocalNow())-#date(2020,1,22)),#duration(1,0,0,0)), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Date.ToText([Column1],"MM-dd-yyyy")), #"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each Table.PromoteHeaders(Csv.Document(Web.Contents("https://raw.githubusercontent.com",[RelativePath="/Laila92/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/"&[Custom]&".csv"]),[Delimiter=",", Columns=6, Encoding=65001, QuoteStyle=QuoteStyle.None]),[PromoteAllScalars=true])), #"Removed Errors" = Table.RemoveRowsWithErrors(#"Added Custom1", {"Custom.1"}), #"Expanded Custom.1" = Table.ExpandTableColumn(#"Removed Errors", "Custom.1", {"Province/State", "Country/Region", "Last Update", "Confirmed", "Deaths", "Recovered"}, {"Province/State", "Country/Region", "Last Update", "Confirmed", "Deaths", "Recovered"}) in #"Expanded Custom.1"Please also refer to this similar thread: https://community.powerbi.com/t5/Desktop/Get-data-from-web-cannot-bring-the-table/td-p/974083
Best regards,
amitchandak
6 years agoSuper User
Refer, if this can help
https://docs.microsoft.com/en-us/power-bi/service-connect-to-github