Forum Discussion
Is it possible to write a loop script with Power Query to import data in Power BI?
Hi everyone,
I am trying to pull all 'Test Points' (executed test cases) from ADO (Azure DevOps) into Power BI using REST API. After viewing ADO official REST API documents, I noticed they only allow to pull 'Test Points' in a 'Test Suite', and there are hundreds 'Test Suites' in each 'Test Plan'. So, it is not appropriate to extract 'Test Points' one suite by one suite manually.
Is it possible to write a loop script with Power Query in Power BI to get all 'Test Suites' first, then iterate through each 'Test Suite' to pull all 'Test Points' in one round automatically?
Thanks,
Changlin
2 Replies
- vanessafvgCommunity Champion
to be honest i am not entirely surely having never done it. But i found this old thread that might be useful
https://community.powerbi.com/t5/Power-Query/Nested-loop-in-M-Code-question/td-p/1302315
If not potentially something like python could be used?
- ChanglinFrequent Visitor
Hi vanessafvg,
Thanks for answering my questions. I have viewed the thread you gave, it is like inner join which is not an example to use loop to get outside data source. But I will try the loop centence in the example and see if I can get what I want.
Thanks & Have a great day,
Changlin