Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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-microsoft-al-with-power-bi/) , and am able to connect to the Github repo but not seeing the actual data. Instead i see like how many people contributed.
How do I load the actual data into Powerbi?
Solved! Go to Solution.
Hi @Laila92 ,
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,
Hi @Laila92 ,
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,
That is a great solution! However, it's only pulling data from 1/22/2020 - 3/18/2020.
So, I've changed the Relative Path in your code to go directly to the Johns Hopkins github:
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="/CSSEGISandData/COVID-19/tree/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"
But there is some problem. After I load the data into Advanced Editor, here is the outcome. No data:
I would appreciate any help! Thank you.
-Stephen
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |