cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drako
Resolver I
Resolver I

Can get Aggreagte to work in SQL connector

Hi,

   I'm using the SLQ conector. My query works great wihtout issues but when I try to use the aggregate option the flow crashes. This is whta I have set up:

 

drako_0-1613153502574.png

 

   The aggregate is: aggregate(Minutes with sum as TotalMinutes)

   Minutes is a SQL field as decimal thta I want to sum. I have not been able to egt this to work...any ideas? Also is their a way to GroupBy?

 

Kind Regards

 

 

3 REPLIES 3
abm
Super User
Super User

Hi @drako 

 

I have tested this with my local sql server and Azure SQL server. Both did worked for me. Most likely the error is related to your filter query.

 

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @abm , I had thought of this also...if I remove the aggregate the query works...so the filter is fine... could it be that these don't work together...you can only an aggregate or a filter?

Hi @drako 

 

Yes looks like currently there are no support for aggregate against filter conditions. Your other option is try this directly under as a SQL query and expose that as a sql stored procedure. So when you calling from Power Automate you can pass those filter query parameter values to SQL SP.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Kudoed Authors
Users online (3,000)