Forum

How to automate or ...
 
Notifications
Clear all

How to automate or repeat the steps for the same table layout in power query

4 Posts
3 Users
0 Reactions
440 Views
(@mgbsher)
Posts: 35
Trusted Member
Topic starter
 

Hi,

I am importing data from a website that has the exact table(s) layout even if URL changed but the same layout still exist.

For example these URLs include different information but the layout is the same:

https://www.gsmarena.com/apple_iphone_13_pro_max-11089.php

https://www.gsmarena.com/apple_iphone_13_pro-11102.php

https://www.gsmarena.com/apple_iphone_13-11103.php

I am repeating a lot of steps and wondering if I can automate or redo it automatically.

For example when I load data I get this page:

So, I am always selecting the same exact tables whatever was the URL because all URLs has the same layout.

So after I select the tables I am doing some steps on each table, like add some columns, delete some rows ...etc.

so how to repeat it and do it automatically?

Thanks

 
Posted : 14/12/2021 8:08 am
Alan Sidman
(@alansidman)
Posts: 220
Member Moderator
 

Build  your first query.  In the left window, click on duplicate.  Then change the source in the second query.  Repeat for each query.

 
Posted : 14/12/2021 10:12 pm
(@mgbsher)
Posts: 35
Trusted Member
Topic starter
 

Thanks

 
Posted : 15/12/2021 2:21 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

Have you seen this article?
https://www.myonlinetraininghub.com/scrape-data-multiple-web-pages-power-query

Br,
Anders

 
Posted : 15/12/2021 5:14 am
Share: