Power Query to download historical stock data from Yahoo Finance

sam007

New Member
Joined
Jun 12, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am using Power Query to automatically download historical stock price data from Yahoo! Finance into Excel. The URL is Invesco QQQ Trust, Series 1 (QQQ) Stock Historical Prices & Data - Yahoo Finance

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.
 

Attachments

  • Untitled.png
    Untitled.png
    8.9 KB · Views: 86

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
maybe
Rich (BB code):
let
    Source = Web.Page(Web.Contents("https://finance.yahoo.com/quote/QQQ/history/")),
    Data2 = Source{2}[Data],
    Replace = Table.ReplaceValue(Data2,",","",Replacer.ReplaceText,{"Open", "High", "Low", "Close*", "Adj Close**", "Volume"}),
    Type = Table.TransformColumnTypes(Replace,{{"Date", type date}, {"Open", type number}, {"High", type number}, {"Low", type number}, {"Close*", type number}, {"Adj Close**", type number}, {"Volume", Int64.Type}})
in
    Type
 
Upvote 0
@sam007
While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,223,957
Messages
6,175,622
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top