What is this whole delegation about? The key part of PowerApps are the data sources the apps are built on. The ability to limit the amount of data that we bring from these sources into that app is very important. This means, we must push the responsibility of filtering, sorting and shaping tables of data, as much as possible, to the data source and not the canvas app.

Delegation becomes an important concept when dealing with large data sets, which by default means above 500 records (though it can be increased to 2000 in your canvas app). Above this limit, PowerApps will delegate the processing of data to the data source, rather than moving the data to the app for processing locally.

The whole hullabaloo about delegation is because not everything that can be expressed in a PowerApps formula can be delegated to every data source.

This means, the first 500 records in your data source will be brought back to the app, then filtered, sorted or shaped locally in the way you specified. What you want instead, is to let the data source do this data query manipulations and return only items that meet your criteria, but not the first 500 which might include items you did not want.

The thing to remember is, once your data is loaded into memory, delegation issues do not apply. You can use any of the PowerApps formula. Imported Excel workbooks (using the Add static data to your app data source), collections, and tables stored in context variables don’t require delegation.

There are three factors to this delegation issue.

  • The data source type
  • The column types
  • PowerApps functions

Working with large data sets requires using data sources, columns types and formulas that can be delegated.

Data sources

These include all tabular data sources that have connectors for PowerApps.

Column Types

These include the Number, Text, Boolean, DateTime and Complex types

PowerApps functions

The following list PowerApps functions that can be delegated but with a caveat.

Filter functions

These include Filter, Search, and LookUp functions.

Sorting functions

These include Sort and SortByColumns functions.

Aggregate functions

Sum, Average, Min, and Max can be delegated. Only a limited number of data sources support this delegation at this time; check the delegation list for details.

Table shaping functions

AddColumns, DropColumns, RenameColumns, and ShowColumns partially support delegation.

This series will look at how we can overcome delegation keeping in mind the three factors we’ve talked about.