Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I would like to make a kind of a loop in Power BI M so that I can automatise the creation of a new table (lets call this ResultTable).
Right now, I have a table that I want to iterate throug.
This table is called "AllPickList" and I would like to make a funciton that will make a call to my API using these values.
In the exemple below, I have a piece of code that will make the API call, but it is limited to the first row of the table "AllPickList".
= (data as table) => GetPickListOptions(data{0}[Column1.id])
Best case scenario, I would like to iterate trhough my table until its empty, otherwise we can use an index with a set value (right now it is 182). Then I would like to put in a new table ("ResultTable") all the data fetched from my API call thanks to the function GetPickListOptions which take an ID from "AllPickList".
I am stuck on this, so if anybody can help me with this, this is much appreciated.
Solved! Go to Solution.
Hello @Anonymous ,
add a new column and then use the function.
The function you can create in another query.
This should lead you in the right direction:
Hello @Anonymous ,
add a new column and then use the function.
The function you can create in another query.
This should lead you in the right direction:
I can't believe it was this simple, thank you so much !
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |