cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeppevatane
Frequent Visitor

Excel Online Business - Retrieve and modify data from SQL using Power Query, and adding those rows to an Excel-table in Sharepoint

Hi again all,

 

I created my first flow successfully this week and I'm hooked with this system thing. I am trying to create a new flow, which "flows" once a month, where I am retrieving data from the last 30 days , from SQL from 2 different tables and joining them together. I want to add these new rows to an Excel-table (where earlier rows exist and I want to keep them), which is located in Sharepoint. I've managed to add these rows to the excel table, but for some reason it adds these rows 7x each, which is not ideal... 😄 

 

Here's my flow, it's in Finnish but I will translate the important parts:

 

jeppevatane_2-1595581371553.png

 

So my question is: why does it add these rows 7 times each?

 

Thx,

 

Jeppe

1 ACCEPTED SOLUTION

Accepted Solutions
ChristianAbata
Super User II
Super User II

oh @jeppevatane  this is because you have an apply to each, that means if you have 3 rows, apply to each is going to repeat the process for 3 times, if you look into a previus run, I'm totally shure that you have 7 rows.

 

To solve this you need to create variables see I have and example here about how to use variables.

 

variables.PNG

 

see In my example the office 365 action give's me lots of rows and then I'm adding that results to my array variable, and then outside apply to each I'm able to use my variable that contents all de data from my office 365 action.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

2 REPLIES 2
ChristianAbata
Super User II
Super User II

oh @jeppevatane  this is because you have an apply to each, that means if you have 3 rows, apply to each is going to repeat the process for 3 times, if you look into a previus run, I'm totally shure that you have 7 rows.

 

To solve this you need to create variables see I have and example here about how to use variables.

 

variables.PNG

 

see In my example the office 365 action give's me lots of rows and then I'm adding that results to my array variable, and then outside apply to each I'm able to use my variable that contents all de data from my office 365 action.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Hi @ChristianAbata ,

 

Thank you! With that tip the flow works and adds the row only once! 🙂

 

jeppe

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (73,460)