Forum Discussion
Foreach loop in PowerQuery
- 6 years ago
Hi Anonymous
I've got a blog post that deals with just this situation but I don't know the rules here for linking out to such things so I won't.
Using a custom function may do the job but without knowing a lot more about what it is you are actually trying to achieve, it's very hard to give you a solution.
What API are you using?
What data does the 1st query return?
How do the 2nd queries get affected by this?
How do you want to change the URL in the 2nd query/ies.
Regards
Phil
Thanks for the help. I gradually learned how I was supposed to do this. In hindsight I now know how open my questions. Really needed some first step guidance :). I got it working by making a custom function and call that from the first query. Like in the line below. The part "each TestRuns([testId])" was crucial in this. With that, it uses the function for each test ID it finds and adds the results to the existing table.
#"Invoked Custom Function" = Table.AddColumn(ExpandTests, "TestRuns", each TestRuns([testId])),