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 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
    153,084 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
    153,084 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

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard