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
Hello!
I have the following table T, containing pairs of keys/secrets to access an API:
| Key | Secret |
| abcd1 | 1234a |
| fgh2 | 5678b |
Next, I have a parametrized function F to call an API method:
= (page, key, secret) =>
let body = "{
""call"":""ListarClientes"",
""app_key"":"&key&",
""app_secret"":"&secret&",
...
Finally, I have a simple function I to iterate through multiple pages:
= List.Generate(()=>
[Result = try F(1, key, secret)otherwise null, Page = 1],
each [Result]<>null,
each [Result = try F([Page]+1, key, secret)otherwise null, Page = [Page]+1],
each [Result])
What I need: for each row of table T, run I, and store all the results into one table R- after this step, I already figured out how to transform the results.
I tried something like this
let
keys = A[key],
Cli = List.Transform(keys, each I)
in Cli
But since I have more than one parameter (in this case, [key] and [secret]), it didn't work. Any sugestions?
Thanks in advance!
Solved! Go to Solution.
Hello, sorry for the delayed response, sudden shift in projects 😕
Your answer was on the right path. What I needed to do: Table.AddColumn(Source, "I", each I([key], [secret])). This way, I've managed to call multiple times each pair key/secret through loop function I.
Thanks!
instead of List.Generate use Table.AddColumn - column from function call.
Hello, sorry for the delayed response, sudden shift in projects 😕
Your answer was on the right path. What I needed to do: Table.AddColumn(Source, "I", each I([key], [secret])). This way, I've managed to call multiple times each pair key/secret through loop function I.
Thanks!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |