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.
With Power Bi, is there a way to run some logic before making an API Call (with the Web datasource?)
My current environment requires that I build several API strings because I am querying multiple projects, I have api calls similar to this:
http://api.com/project/projectID/getTasks
In order for me to get projectIDs I need to make another API call similar to this: http://api.com/projects/ResourceName/getProjectID
where resource name is usually a team name. This API call returns around 100 results. Now with these 100 projectIDs, I will need to basically make 100 API calls similar to this:
http://api.com/project/001/getTasks ,
http://api.com/project/002/getTasks ,
http://api.com/project/003/getTasks etc.
Can I do that with Power BI and How? Keep in mind that I will have to publish the report and have a scheduled data source refresh. Thank you
Solved! Go to Solution.
Please check out this post: https://www.thebiccountant.com/2018/03/22/web-scraping-2-scrape-multiple-pages-power-bi-power-query/
It contains links to many resources that should provide the help you need.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Please check out this post: https://www.thebiccountant.com/2018/03/22/web-scraping-2-scrape-multiple-pages-power-bi-power-query/
It contains links to many resources that should provide the help you need.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ImkeF ,
Thank you for your reply and your article is very helpful.
However, after I followed your steps and completed the WSJ-IncomeStatement Lab, I found out that all values of each company are same. It means that it copys the same table to all companies.
After a whole weekend of studying, I fixed that by
In stead of using
Source = Web.Page(Web.Contents("https://quotes.wsj.com/AAPL/financials/annual/income-statement",
[Query = "quotes.wsj.com/" & CompanyCode & "/financials/annual/income-statement"])),
I use
Source = Web.Page(Web.Contents("https://quotes.wsj.com/",
[RelativePath ="" & CompanyCode & "/financials/annual/income-statement" ] )),
It fixed the problem and scheduled refresh works well. (a personal gateway need to be setup)
I will mark your answer as the result because it really helps and show me the right direction to study with.
Thank you so much for reply immediatly.
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |