Hi all,
I'm pretty new to all this. I am working on a sheet that imports data from the web. So just for reference, I followed this tutorial:
I'm basically pulling in football data from the web and the "URL" tables that have been created change by a vlookup function with the idea that it would then pull in another teams data when the web URL is changed and the data refreshed. So far so good. It all works fine the first time round and then when it changes I get the following error:
"[Expression. Error] The column 'For Bournemouth Date' of the table wasn't found."
I have managed to trace it back to the code in the advanced editor below:
Obviously the error occurs when I change it to say Bristol City because the code it is looking on the web for Bournemouth. Could anyone help me so that "For Bournemouth Date" (and all the others) pull in the data with whatever the column header is from the web source rather than looking for what is between the quotation marks?
Thanks in advance for any comments!
I'm pretty new to all this. I am working on a sheet that imports data from the web. So just for reference, I followed this tutorial:
I'm basically pulling in football data from the web and the "URL" tables that have been created change by a vlookup function with the idea that it would then pull in another teams data when the web URL is changed and the data refreshed. So far so good. It all works fine the first time round and then when it changes I get the following error:
"[Expression. Error] The column 'For Bournemouth Date' of the table wasn't found."
I have managed to trace it back to the code in the advanced editor below:
Power Query:
(URL) as table =>
let
Source = Web.Page(Web.Contents(URL)),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"For Bournemouth Date", type date}, {"For Bournemouth Time", type time}, {"For Bournemouth Round", type text}, {"For Bournemouth Day", type text}, {"For Bournemouth Venue", type text}, {"For Bournemouth Result", type text}, {"For Bournemouth GF", Int64.Type}, {"For Bournemouth GA", Int64.Type}, {"For Bournemouth Opponent", type text}, {"For Bournemouth Att", Int64.Type}, {"Pass Types Live", Int64.Type}, {"Pass Types Dead", Int64.Type}, {"Pass Types FK", Int64.Type}, {"Pass Types TB", Int64.Type}, {"Pass Types Sw", Int64.Type}, {"Pass Types Crs", Int64.Type}, {"Pass Types TI", Int64.Type}, {"Pass Types CK", Int64.Type}, {"Corner Kicks In", Int64.Type}, {"Corner Kicks Out", Int64.Type}, {"Corner Kicks Str", Int64.Type}, {"Outcomes Cmp", Int64.Type}, {"Outcomes Off", Int64.Type}, {"Outcomes Blocks", Int64.Type}, {"Match Report", type text}})
in
#"Changed Type"
Obviously the error occurs when I change it to say Bristol City because the code it is looking on the web for Bournemouth. Could anyone help me so that "For Bournemouth Date" (and all the others) pull in the data with whatever the column header is from the web source rather than looking for what is between the quotation marks?
Thanks in advance for any comments!
Last edited by a moderator: