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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
wataruf
Regular Visitor

I want to use multiple values registered in the list as URL

I created a list called "MessageID_List".

キャプチャ.PNG

I use Web.Contents () to get data from the target URL.

There are multiple target pages.
I want to use the value in "MessageID_List" as part of the URL.

How can I achieve this using Power Query?

キャプチャ2.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @wataruf ,

 

This is the function that makes an https call:

(PageNum as text)=>
let
    Source = Web.Page(Web.Contents("https://eddb.io/commodity/" & PageNum, [Timeout=#duration(0, 0, 1, 0)])),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Id] = "table-stations-min-buy")),
    Data = if Table.RowCount(#"Filtered Rows") > 0 then  #"Filtered Rows"{0}[Data] else  null
in
    Data

 

You need to modify it to your scenario: replace everything after "=>" with the code on your screenshot and then change [XXXX] on your screenshot to PageNum.

 

This is how it is called (assuming the query/function name above is Query2😞

let
    Source = MeddageID_List, //this referes to your parameters list converted to a table on the next step
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Query2(Text.From([Column1])))
in
   #"Added Custom"

An output of the above will be your list with Tables in the column Custom. You will need to expand it to get the actual content retrieved by Web.Content inside the Query2 function.

 

Hope this helps.

 

Kind regards,

John

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you for your quick response.

I read the thread that taught you.
However, I didn't know how to use this content for my request.
I will learn what the functions used in the threads mean.

Anonymous
Not applicable

Hi @wataruf ,

 

This is the function that makes an https call:

(PageNum as text)=>
let
    Source = Web.Page(Web.Contents("https://eddb.io/commodity/" & PageNum, [Timeout=#duration(0, 0, 1, 0)])),
    #"Filtered Rows" = Table.SelectRows(Source, each ([Id] = "table-stations-min-buy")),
    Data = if Table.RowCount(#"Filtered Rows") > 0 then  #"Filtered Rows"{0}[Data] else  null
in
    Data

 

You need to modify it to your scenario: replace everything after "=>" with the code on your screenshot and then change [XXXX] on your screenshot to PageNum.

 

This is how it is called (assuming the query/function name above is Query2😞

let
    Source = MeddageID_List, //this referes to your parameters list converted to a table on the next step
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Query2(Text.From([Column1])))
in
   #"Added Custom"

An output of the above will be your list with Tables in the column Custom. You will need to expand it to get the actual content retrieved by Web.Content inside the Query2 function.

 

Hope this helps.

 

Kind regards,

John

 

 

It worked perfectly.
Thank you very much for helping me.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors