Dec 02 2021 07:46 PM
Hello, I wanted to ask if it's possible to download two tables from a list of URLs in one single query?
Please refer to the attached file. I have a list of URLs for different stock codes. At the moment I've set up two queries to download two separate tables from the same web page.
I was wondering besides using Append Queries, is there any way to set up just one single function query in the beginning to capture both tables in one go?
Any help and insight is much appreciated.
Thank you!
Dec 03 2021 12:16 AM
Solution@nes_k4 Change the applied step in fxOther where you initially filter one table to this:
#"Filtered Rows" = Table.SelectRows(Source, each ([Id] = "cnhk-list" or [Id] = "cnhk-list2")),
Now the function will load both tables and create one bigger table.
Dec 03 2021 10:34 PM
Dec 03 2021 10:56 PM
@nes_k4 That I don't really know. Sorry!
Dec 03 2021 11:48 PM
Dec 04 2021 06:44 PM
@Riny_van_Eekelencould I please ask another question?
I want to download tables "Regular advisers" and "One-time advisers" in one query from the below website:
https://webb-site.com/dbpub/advisers.asp?p=488
How should I amend the below codes that are currently picking up "Regular advisers" only?
let
Source = Web.Page(Web.Contents("https://webb-site.com/dbpub/advisers.asp?p=488")),
Data0 = Source{0}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Data0, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Adviser", type text}, {"Role", type text}, {"Added", type date}, {"Removed", type date}})
in
#"Changed Type"
Thank you so much for your help!
Dec 04 2021 10:01 PM
@nes_k4 When you connect to that URL, it show three tables "Document", "One-time advisers" and "Regular advisers". Tick the "Select multiple items" box. Now select the two tables (see picture) you want and press transform. You'll end up with two queries that you can transform a bit and then append into one new query. If that's what you need, of course, like in the attached file.
Dec 04 2021 10:50 PM
@Riny_van_Eekelenthis is great, thank you very much!