Forum Discussion
Dynamic URL generation for queries with data from a table
I am new to Power BI and got a request by my superior to generate a table for a customer.
The objective is to first do Web query and get a table of data, within this table there are certain identifiers which in turn I should use for another web query to create a new table with new data.
So in summary: Table 1 contains a cloumn with an id -> take each individual id and perform a new query with the id integrated in the URL -> add this data to a column of table 1 (or create another table). So question now is, is it possible to generate a "dynamic" query? Meaning that I let Power BI loop through all the id's via a web call (REST api) and collect that data somewhere ?
Thanks in advance !!
2 Replies
- amitchandak
Super User
rankr90 , You can loop, not sure it can serve the purpose
https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78
- v-yueyunzh-msft
Community Support
Hi , rankr90
For your needs, I think you can use a Power Query custom function to define the ID column you want to return, and then create a connection and call that function to get the data you want.
For more information , you can refer to this :
Using custom functions in Power Query - Power Query | Microsoft Learn
How to use Power Query Custom Functions (exceloffthegrid.com)
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly