Forum Discussion
CSV Web connection doesn't update my report properly
- 6 years ago
Try removing your Columns=42 completely. I will see if I can test this.
Try replacing your Origin line with:
Origin = Csv.Document(Web.Contents("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv")),
This gets rid of the definition for how many columns there are. That being said, you will have to be careful with the rest of your query. A dynamic set of columns is not the most pleasant thing to deal with. It can play havoc with the rest of your query. I would promote the first row and then immediately use unpivot other columns to unpivot the day columns. Also get rid of any automatic Change Type step. Use something like the following for the first part of your query:
let
Source = Csv.Document(Web.Contents("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv")),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Promoted Headers", {"Province/State", "Country/Region", "Lat", "Long"}, "Attribute", "Value"),
#"Renamed Columns" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Attribute", "Day"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Value", Int64.Type}, {"Day", type date}})
in
#"Changed Type"I had the same issue and yes its solved and the latest column is showing now but may I ask you if you want to display the latest date column in a graph .. would that be possible? i mean if you want to keep using the latest column (for the last date inserted) added to the data for the graph(after an update) would that be possible?
Greg_Deckler Anonymous