Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Struggle with nested for each

(0) ShareShare
ReportReport
Posted on by

Hey together,

I try to create a flow, that creates a new item in my sharepoint list and put data from four different powerbi query against datasets into four different columns. When I tried the same with just one quer, that means with just one instead of the four parallel branches, it worked perfectly. But since I added the outputs from every "analyse json" to its associated columns, I get these four nested "for each" actions. Result is, that my flow always skips the steps after second "for each". I also don't get, why the first two for each are working an the last two are struggeling...

luwu_7100_1-1706629776463.png

Is there a possibility to get around these nested "for each" actions or does anybody have other suggestions to solve the problem.

Thanks in advance,

Lukas

 

  • Unknown geen idee Profile Picture
    1,755 on at
    Re: Struggle with nested for each

    Dear I,

    I have not looked at your flow, frankly I do not like the new setup ... but I do have a comment which may help you.

    I have circumvented 'Apply to each' loops by using the first() or last() expression.

    With these you can call out a 'row' in a loop/array without triggering the 'Apply to each' function. In combination with a right 'Array filter' you can basically call out any 'row' you want.

     

    Try it out, there should be plenty of examples for first() or last() in the forums.

     

    Hope this helps, if so, please tag as solution or like.

    Happy flowing,

    Koen

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492