Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bartus1
Helper I
Helper I

Loop Through Several Values, Change API Call URL and Insert Into Table

Hi,

 

Have seen this thread, but I am still unclear what to do...

 

1.  API call - gets IDs wchih are stored in table1 - works great.  Table is neat and ready to go.

2.  Need to make another API call FOR EACH ID stored previously (table1), which will return items for each ID.

 

Eventually, will do 3rd call to get all detaisl for each item ID from #2.

 

Thanks.

1 ACCEPTED SOLUTION

Thanks a bunch v-ljerr-msf.

 

The 2nd article did help a lot.  Now, it seems very easy LOL.  I did run cirles around this.

 

Very much appreciated.

 

Bart

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @bartus1,

 

Have you managed to create a function like below.

let functionName = (param1 as datatype) =>
let
 Source = Json.Document(Web.Contents("URL" & param1 & "/summary").
in
 Source
in functionName

If yes, then what you need to do next is adding a custom column in table1 that calls/invokes the function above. You should be able to find the detailed steps in following two articles. Smiley Happy

 

http://datachix.com/2014/05/22/power-query-functions-some-scenarios/

http://satalyst.com/power-query-creating-a-parameterized-function-in-m/

 

Regards

Thanks a bunch v-ljerr-msf.

 

The 2nd article did help a lot.  Now, it seems very easy LOL.  I did run cirles around this.

 

Very much appreciated.

 

Bart

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.