Forum

Website Power Query...
 
Notifications
Clear all

Website Power Query: Invoke different ticker symbols

6 Posts
2 Users
0 Reactions
200 Views
(@leijat)
Posts: 3
Active Member
Topic starter
 

I want to make the web work versus going the API route. The website is static with the ticker symbol on the end of web address. I added the fx to invoke different ticker symbols (picture attached). The only ticker symbol it works with is the one I started with. I cannot invoke new ticker symbols of companies. I get the error that column 20 is missing or invalid. 

Endstate: I want to type it a ticker symbol and pull a small amount of information from the financial statements. Ticker-Capture.PNGAnticipated-End-State-of-a-successful-Power-Query.PNG

 
Posted : 09/09/2021 2:32 pm
(@mynda)
Posts: 4762
Member Admin
 

Hi Tim,

Welcome to our forum! Try removing the 'Changed Type' step to see if that fixes the issue.

Mynda

 
Posted : 09/09/2021 8:12 pm
(@leijat)
Posts: 3
Active Member
Topic starter
 

I removed 

in

 #"Changed Type"

And now I can't get past the error Expression.SyntaxError: Token in Expected.

By the way, I'm a super newbie to PowerQuery and I'm very grateful I stumbled upon your Youtube channel. 

 
Posted : 10/09/2021 7:44 am
(@mynda)
Posts: 4762
Member Admin
 

Are you able to share your file? It's difficult to troubleshoot without seeing the file.

 
Posted : 10/09/2021 11:07 pm
(@leijat)
Posts: 3
Active Member
Topic starter
 

Here is my file. Ticker is on first tab. It works with AAPL, when I built it. It won't work with other tickers. I prefer it to just have the columns on tab 1 that I manually enter. But if I can only pull full table, then I will use VLOOKUP or other formula to assist. 

 
Posted : 20/09/2021 5:48 pm
(@mynda)
Posts: 4762
Member Admin
 

Hi Tim,

Thanks for sharing your file. Unfortunately, the website structure is not consistent which means the table numbers you need to extract vary depending on the ticker. FB it's Table1 and for AAPL it's Table2. That's going to be very difficult to automate unless you know the table numbers in advance.

e.g. the third step in the query; Data2 is = Source{2}[Data] for AAPL and = Source{1}[Data] for FB

You could add this as another variable, but I'm not sure how you're going to be able to keep track of that.

Mynda

 
Posted : 20/09/2021 8:05 pm
Share: