cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Brad_Morgan
Level: Powered On

Delegation SQL Server (Azure) help

Can someone help me understand why I am getting delegation warnings on this Filter? 

 

Text(Sum(Filter('[dbo].[Expense]',Month(Date) = Month(now()) && Year(Date) = Year(now()) && CategoryID = ThisItem.ID),Amount),"[$-en-US]$###,###.##")


Accepted Solutions
Super User Rank
Super User

Re: Delegation SQL Server (Azure) help

I think the problem is filtering sql tables by date. There was a recent post regarding this and a work around. I'm not sure if this is in fact the problem because I don't use Sql connectors currently so I can't test it. Please see https://medium.com/@dmitrii.korolev1/filtering-sql-table-by-date-in-powerapps-4711dc79696a

All Replies
Super User Rank
Super User

Re: Delegation SQL Server (Azure) help

I think the problem is filtering sql tables by date. There was a recent post regarding this and a work around. I'm not sure if this is in fact the problem because I don't use Sql connectors currently so I can't test it. Please see https://medium.com/@dmitrii.korolev1/filtering-sql-table-by-date-in-powerapps-4711dc79696a
Community Support Team Rank
Community Support Team

Re: Delegation SQL Server (Azure) help

Hi @Brad_Morgan,

I agree with @Drrickryp's thought almost. I think this Delegation issue may be related to the Date column within your Filter formula.

Currently, within PowerApps, the Year() function, Month() function are not supported to be delegated within SQL Table data source.

If the amount of your SQL table records is not more than 2000 (you could change the Non-delegable limits to 2000), you could ignore this Delegation issue within your app. If the amount of your SQL table records is more than 2000, as an alternative solution, I agree with @Drrickryp's thought, you could use a Int type column to store the Date value instead of Date type column within your SQL table.

More details about Delegation issue within PowerApps, please check the following article:

Delegation

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.