This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi, everyone.
I'm newer to Power BI, and I'm trying to mash 2 functions together to execute a loop within a loop.
What I need is for a table to be produced that takes each row of the table from GetAllFolders and loops through each row to GetAllQueuesInFolder for each folder. In the end, I want a table that has a row for each queue in all the folders. So, if each of my 4 folders has 2 queues, then I want a table with 5 columns (FolderID, FolderName, QueueName, OrganizationalUnit, and ID) and 8 rows, one for each queue.
Any ideas how to create this function?
Solved! Go to Solution.
=Table.FromRecords(List.TransformMany(Table.ToRecords(GetAllFolders(),each Table.ToRecords(GetAllQueuensinFolder([FolderName])),(x,y)=>x&y))
=Table.FromRecords(List.TransformMany(Table.ToRecords(GetAllFolders(),each Table.ToRecords(GetAllQueuensinFolder([FolderName])),(x,y)=>x&y))
Thanks for your help.
I pasted your function in Power BI like so:
And clicked "Invoke" and got this error:
Any ideas? Thanks again.
EDIT:
I think I wasn't putting the function in the editor correctly. I entered it like this now, and I still got the same error as above.
Thanks so much for your help. I am just learning this language.
my code just a example, you need complete it in your real circumstance.
GetAllFolders() and GetAllQueuensinFolder() may have some arguements to fill.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |