Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am trying to import data using the below query , But I am able to import only the first 30rows in table0..How do I loop to the next table and import the remaing?
Please suggest necessary changes to the 'M' code
URL: http://www.moneycontrol.com/markets/earnings/latest-results/latest/yoy/standalone/
let Source = Web.Page(Web.Contents("http://www.moneycontrol.com/markets/earnings/latest-results/latest/yoy/standalone/")), Data0 = Source{0}[Data], #"Changed Type" = Table.TransformColumnTypes(Data0,{{"Company Name", type text}, {"Sales (Rs Crore) Dec 2016", type number}, {"Sales (Rs Crore) Dec 2015", type number}, {"Sales (Rs Crore) % Chg", type text}, {"Gross Profit (Rs Crore) Dec 2016", type number}, {"Gross Profit (Rs Crore) Dec 2015", type number}, {"Gross Profit (Rs Crore) % Chg", type text}, {"Net Profit (Rs Crore) Dec 2016", type number}, {"Net Profit (Rs Crore) Dec 2015", type number}, {"Net Profit (Rs Crore) % Chg", type text}}) in #"Changed Type"
Thank you.
Please check on below article for loading Data from a webpage having multiple pages
https://www.myonlinetraininghub.com/scrape-data-multiple-web-pages-power-query
Hi! I have the same situation as you. Were you able to find a way to get all the pages? Parameterizing the query won't work for our scenario because the URL doesn't have the page number. In fact, it doesn't change when we switch page by clicking the other page numbers at the bottom.
Regards,
Ferdinand
Hello @Anonymous,
I am running into the same dilemma as you are.
Have you had any luck finding help with this issue?
Please let me know. Thanks.
-K
Hello @Anonymous,
Sorry I wasn't able to find a solution. I ended up just settling for getting just the data on the default page (first page). Just to clarify, the issue is not being able to get additional pages from a URL if the webpage uses javascript for pagination because the URL remains the same even if you navigate the table to next pages.
Regards,
Ferdinand
Gotcha. Yes, that was the issue I had in mind as well.
Thanks for getting back.
-K
This is also worth reading.
Thank you
I have no knowledge about the parameters in the URL.
Could you please let me know how to identify the variable so that I could loop through all the sheets and get the data using power query.
Hi @queryfan,
You can't just use the site URL to get table data in desktop simply. You need to view corresponding API and find the actual URL to get all table data. So the first thing you need to do is contacting Money Control to find the rest API to get data. Then you can follow this simple to do it in desktop: How to call REST APIs and parse JSON with Power BI
Best Regards,
Qiuyun Yu
This looks like it might be useful
http://blogs.adatis.co.uk/callumgreen/post/Loop-through-Multiple-Web-Pages-using-Power-Query
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |