Jun 12 2020 11:22 AM
I am using Power Query to automatically download historical stock price data from Yahoo! Finance into Excel. The URL is https://finance.yahoo.com/quote/QQQ/history/
It populates a worksheet with a year's worth of stock prices with the following columns: Date/Open/High/Low/Close/Adj Close/Volume.
When I try to build a simple line chart using the data, the price column data is not recognized. So the Y-axis of the chart returns no values. I changed the format of the columns to "Number" but it doesn't make any difference.
Does anyone have any solutions or workarounds. I attached a copy of the spreadsheet.
Jun 12 2020 11:28 AM
That's since all data returned is texts
= Table.TransformColumnTypes(Data2,{{"Date", type date}, {"Open", type text}, {"High", type text}, {"Low", type text}, {"Close*", type text}, {"Adj Close**", type text}, {"Volume", type text}})
Please change in Power Query on decimal numbers where applicable.
Jun 12 2020 11:39 AM
Just wondering why the first column (the Date column) is recognized properly as a date column while the other 6 columns are only recognized as text? Is there any way to change the format of the price columns from text to numbers without VBA or any programming?
Thanks!
Jun 12 2020 12:32 PM
SolutionSure, just open the query on editing, find Change Type step, stay on it, select proper column and apply Decimal Number format, close the query.
I did that in attached file.
Jun 12 2020 12:35 PM
Jun 13 2020 06:40 AM
Sam, glad to help
Jun 12 2020 12:32 PM
SolutionSure, just open the query on editing, find Change Type step, stay on it, select proper column and apply Decimal Number format, close the query.
I did that in attached file.