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 / Add columns delegation...
Power Apps
Unanswered

Add columns delegation issue

(0) ShareShare
ReportReport
Posted on by 23

There is no delegation warning but below function (inside Gallery) is not calculating average on any item above 500... Any idea what is wrong or how this could be overcome?

 

Filter(AddColumns(TaskNames,"helperTaskAverage",Sum(Filter(collectionAssignedCompleted,Task=TaskName),TimeSpentOnTask)/Count(Filter(collectionAssignedCompleted,Task=TaskName).ID)),helperTaskAverage>0)

 

Thank you very much in advance.

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @aro1 

    I believe that the problem is occuring at the level where your collection is being created.   Collect() and ClearCollect() are not delegatable functions so they are limited to a maximum of 2000 items.   You need to go to File>Settings>Advanced Settings>Data row limit and increase it from 500 to 2000.  The reason you are not seeing any warnings is that when you use a collection as the datasource, there are no delegation issues.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @aro1 :

    Firstly,could you tell me what your data source is?

    Generally, the data sources that can be delegated include: SharePoint\CDS\SQl Sever.

    Secondly,The output of AddColumns(……) is subject to the non-delegation record limit. In this example, only 500 records are returned even if the TaskNames data source has 501 or more records.

    I think this link will help you a lot:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping#description

    The only way I can think of is to adjust the value of Data row limit for non-delegable queries to 2000.(As @Drrickryp  said)

    file-Settings-Advanced settings

    1.JPG

    Finally,If the number of records is greater than 2000.The data source can be segmented and saved in batches to a collection.(The data source must be delegateable)

    I assume TaskNames is a SharePoint list and "Kind" is one of the text type fields

    For example:

    1\Set the app's OnStart proeprty to:

     

    Clear(MyTaskNames)
    Collect(MyTaskNames,Filter(TaskNames,Kind="Kind1"));
    Collect(MyTaskNames,Filter(TaskNames,Kind="Kind2"));
    ……

     

    2\Try this code

     

    Filter(AddColumns(MyTaskNames,"helperTaskAverage",Sum(Filter(collectionAssignedCompleted,Task=TaskName),TimeSpentOnTask)/Count(Filter(collectionAssignedCompleted,Task=TaskName).ID)),helperTaskAverage>0)

     

    Best Regards,

    Bof

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard