'use column values as urls for web data sources

I have a list query in Power BI with a bunch of urls, each url in the list opens a json file. ¿How can I loop through the list and add each json as a new web data source? The manual process works fine when I copy each url and paste it in the web source dialog box but I want to automate this process, given that the elements in the list query are dynamic.



Solution 1:[1]

If your list of url's have a continues number which can be used as a parameter, you can use the List.Generate method and generate a list as in the below code:

= List.Generate(  
   ()  => [Offset = 0, Pokemon = "a" ],
   each [Offset] <= 200  , 
   each [ Offset = [Offset] + 100,
          Pokemon = [Pokemon] ] )

Please refer the below link for more info: How to use List.Generate to make API Calls in Power Query M

From the info on the above link I created the Power BI Dashboard for Pokémon making dynamic rest API calls: Pokemon API Call Report

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vibhor Goyal