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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delegation warning wit...
Power Apps
Answered

Delegation warning with filter query

(0) ShareShare
ReportReport
Posted on by 26

Hello All,

 

Getting a delegation warning when created date is compared with current year, how can I avoid this. Please help!

Datasource is SharePoint list

OnChange (of year dropdown) = Set(varYear=ddlYear.Selected.Value);

Filter(TestDataSource, Area=ddlArea.Selected.Value && Month=ddlMonth.Selected.Value && Year(Created)=varYear)

 

Thanks

Surya

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @sthurangi 

    Year() is not Delegable - if you want to filter the newest 2,000 records matching the top filter (and get rid of the warning), you can do this

    With(
     {
     wList:
     Filter(
     Sort(
     TestDataSource, 
     ID,
     Descending
     ),
     Area=ddlArea.Selected.Value && 
     Month=ddlMonth.Selected.Value
     )
     },
     Filter(
     wList,
     Year(Created)=varYear
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • sthurangi Profile Picture
    26 on at

    @WarrenBelz 

    Thanks for your reply!

    It is working as you said.

    Thanks very much

     

    Instead of using the "With" function, can we use calculated column to get year from Created as below:

    CurrentYear column = Text([created],"yyyy") with data type as single line text and query the results.

     

    Filter(TestDataSource, Area=ddlArea.Selected.Value && Month=ddlMonth.Selected.Value && CurrentYear=varYear)

    Is above query is correct,  even though I am having delegation warning. Please correct me.

     

    Thanks

    Surya

     

  • Verified answer
    WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @sthurangi ,

    Calculated columns are not Delegable either (and really should not be used in Power Apps as it is far better to do the calculation there). Please have a read of my blog on Delegation - at times you have to plan your data structure to allow for queries you might want to do. If I had to do your query, I would have a numeric field in my list for Year and default this to the Year of your Date Picker.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard