Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi Gurus
I am trying to pull information for certain US stocks from finance.yahoo.com
The web address follows a similar pattern for all stock symbols
https://finance.yahoo.com/quote/AAPL/key-statistics?p=AAPL
So I wrote a custom function
(Ticker) => try Web.Page(
Web.Contents("https://finance.yahoo.com/quote/" & Ticker & "/key-statistics?p=" & Ticker,[Timeout=#duration(0,0,0,10)])) otherwise null and invoked it over the symbols i have.
It works but is very slow when i use 500 + symbols
I read about function.scalarvector in Chris Webb's blog
https://blog.crossjoin.co.uk/2018/11/16/function-scalarvector-optimise-power-query-m-functions/
Please could you help me optimize the web queries using this or any other way
I tried with following. It works but does not optimize the query
Function.ScalarVector(
type function(Tickersymbol as text) as text,
(InputTable) =>
let
BufferTable = Table.Buffer(InputTable),
InputList = BufferTable[Tickersymbol],
CallFunction = GetStatistics(InputList)
in
CallFunction
)Please the see the file for more clarity
https://drive.google.com/file/d/12C280ItzuSf7D6cYr-Nl8wj9NzuCeAxu/view?usp=sharing
Function looks as it should, so it might not be supported by the yahoo then.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |