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 / Sql Statement to filte...
Power Automate
Unanswered

Sql Statement to filter Excel Table with dynamic data

(0) ShareShare
ReportReport
Posted on by 214

I have 2 lists that will be changing every day. 

 

List A are Sales requests from clients (From Legacy System) 

 

List B is our CRM System Data Dump (excel b.c. cheap)

 

I am Creating List C, D, E, F, and G. Using the Sales Requests and Legacy system information.

 

We are using PAD because everything needs to stay on network.

 

They only key that links both lists is the account # field. 

 

Originally my flow was using PAD if actions as shown below to see if 

 

IF Excel List A Current Item [Account Number] = List B Current Item  [Account Number] 

Then do X,Y,andZ

 

This was taking forever to run, so, I after some research I am thinking a about pulling in the big excel table with 33k rows 

Via

1.) Open SQL connection to an excel file.

2.) Execute SQL Statement to filter for rows the Account numbers in List A (which is always smaller)?

3. Use for each to loop through each table as I had it before...???

 

I am racking my brain attempting to create a filter for the account numbers via the SQL statement, it would have to be a variable since its changing. What are your guys thoughts? 

 

Any issues with #3?

 

PAD excel if.JPGexcel if flow taking foreverexcel if flow taking forever

 

 

 

I have the same question (0)
  • takolota1 Profile Picture
    4,974 Moderator on at

    @mcnemare1 

     

    Are you trying to update the Excel with values or calculated/transformed values from SQL?

     

    What is the reason for needing to stay on network? Some kind of security or something that would prevent the use of cloud flows?

  • mcnemare1 Profile Picture
    214 on at

    @takolota 

     

    Sorry for the belated response. 

     

    It has determined that since CRM report holds customer sensitive information, that any flows created should be in-network and cloud flows avoided.  

     

    Correct I am trying to filter excel with calculated values from SQL statement.

     

    Since List A 'Sales Requests' (excel file) is always going to be smaller than List B 'CRM' Excel File. 

     

    I'm thinking it would be easier to filter List B 'CRM' by 'List A' Sales Requests. Via SQL first to reduce the initial loops are taking in PAD. thoughts?

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard