Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ramiroferrando
Regular Visitor

Looping Get Data from multiple URLs (>100)

Hi, 

First of all, thanks in advance for taking the time to help.

I'm trying to automatically get data from multiple URLs (Variable "Link"). The only thing that changes among the URLs is the variable "Ticker".

 

1.png

What I'd like to do is to "Get Data" from all of these URLs and to apply the same steps.

 

Example for the 1st:

let
    Source = Csv.Document(Web.Contents("http://www.stockpup.com/data/AMR_quarterly_financial_data.csv"),[Delimiter=",", Columns=41, Encoding=1252, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Quarter end", type date}, {"Shares", Int64.Type}, {"Shares split adjusted", Int64.Type}, {"Split factor", type number}, {"Assets", Currency.Type}, {"Current Assets", Currency.Type}, {"Liabilities", Currency.Type}, {"Current Liabilities", Currency.Type}, {"Shareholders equity", Currency.Type}, {"Non-controlling interest", Int64.Type}, {"Preferred equity", Int64.Type}, {"Goodwill & intangibles", Currency.Type}, {"Long-term debt", Currency.Type}, {"Revenue", Currency.Type}, {"Earnings", Currency.Type}, {"Earnings available for common stockholders", Currency.Type}, {"EPS basic", Currency.Type}, {"EPS diluted", Currency.Type}, {"Dividend per share", Currency.Type}, {"Cash from operating activities", Currency.Type}, {"Cash from investing activities", Currency.Type}, {"Cash from financing activities", Currency.Type}, {"Cash change during period", Currency.Type}, {"Cash at end of period", Currency.Type}, {"Capital expenditures", Currency.Type}, {"Price", Currency.Type}, {"Price high", Currency.Type}, {"Price low", Currency.Type}, {"ROE", type number}, {"ROA", type number}, {"Book value of equity per share", type number}, {"P/B ratio", type number}, {"P/E ratio", type number}, {"Cumulative dividends per share", Currency.Type}, {"Dividend payout ratio", type number}, {"Long-term debt to equity ratio", type number}, {"Equity to assets ratio", Percentage.Type}, {"Net margin", Percentage.Type}, {"Asset turnover", type number}, {"Free cash flow per share", Currency.Type}, {"Current ratio", type number}})
in
    #"Changed Type"

Is there any way to automatically get more than 100 tables for each one of these Tickers?

I've tried using the Tickers as Parameters, but I don't know how to build the loop so I don't need to repeat the same thing over and over.

 

Thank you so much for the help 🙂

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @ramiroferrando ,

An easy way to do that is using a custom function, then apply this function to all rows by adding a column, after expand the column, for more information, please refer to this blog: https://radacad.com/custom-functions-made-easy-in-power-bi-desktop

Best Regards,

Teige

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors