web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Do until is not stoppi...
Power Automate
Unanswered

Do until is not stopping after the variable met the condition of loop termination

(0) ShareShare
ReportReport
Posted on by 18

I was doing automation for exporting a table for 10 stores and save as a csv file from Power BI to sharepoint. 

 

The output of the flow is good, but the flow does not stop as defined. 

 

At first, I was thinking maybe I shall put the 'Increment variable' outside of 'Apply to each', but not working. 

 

Then, I was thinking maybe the 'Apply to each' shall only include 'Create file in sharepoint', still not working. 

 

Could someone help me to see which step did I do wrong? The variable 'StoreIndex' does increment, but the stopping point 'StoreIndex' <= 3 is not executed. 

 

Below are two versions of this flow. 

 

0.png1.png

 

Thanks in advance. 

Categories:
I have the same question (0)
  • TreeTreeTree Profile Picture
    18 on at

    I kind of figured out it was caused by referring Power BI columns while creating sharepoint files, the Power BI column involvement forced the step to be put in 'apply to each'. Without referring Power BI columns, the 'apply to each' is not automatically added. Continuing fixing the issues. This brings a point that the variable 'StoreIndex' defined in Power Automate is not equivalent to the 'StoreIndex' column I defined in Power BI. They are parallel independent code running by themselves, even though I use one to model the value of the other. 

  • Verified answer
    TreeTreeTree Profile Picture
    18 on at

    The 'Apply to each' is the cause of endless loop for this case and the cause of 'Apply to each' automatically added for a step is the referring of Power BI Columns. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard