Power Apps: Sort/Filter + Delegation
Power Apps
17. Nov 2025 14:23

Power Apps: Sort/Filter + Delegation

von HubSite 365 über Reza Dorrani

Principal Program Manager at Microsoft Power CAT Team | Power Platform Content Creator

Master Power Apps sorting and filtering across multiple columns with Power Fx and SharePoint delegation best practices

Key insights

  • Sort vs SortByColumns: Use Sort for single-column or formula-based ordering and SortByColumns when you need to sort by several columns with specific directions.
    Prefer SortByColumns for clear multi-column control and predictable results on larger datasets.
  • Filter and Search: Use Filter to apply one or more criteria and Search to look across multiple text columns.
    Combine Filter with SortByColumns (for example: SortByColumns(Filter(MyDataSource, Title = TextInput1.Text), "Title", Ascending, "Date", Descending)) to return sorted, filtered results.
  • Delegation: Delegation pushes queries to the server so the app stays fast with large sources like SharePoint or Dataverse.
    Check which functions and operators are delegable for your connector, and avoid client-side operations that force the app to download all records.
  • Dynamic multi-column sorting: Let users click headers or use UI controls to add columns to the sort order, and toggle ascending/descending per column.
    Store the active sort columns and directions in a variable or collection so the app can apply the same order consistently.
  • Visual indicators: Show icons or arrows next to column headers to indicate active sorts and filter states.
    Update these indicators from the same variables you use for sorting and filtering to keep the UI clear and consistent.
  • Performance best practices: Limit returned columns, use indexed fields for SharePoint filters, avoid non-delegable functions in predicates, and test with real data sizes.
    Design filters and sorts to run server-side and simplify in-app logic to keep your app responsive and scalable.

Reza Dorrani’s recent YouTube video offers a clear, practical guide for sorting and filtering data in Power Apps, and it aims to help developers build responsive apps that scale. The tutorial focuses on combining the core functions of Power Fx such as Sort, SortByColumns, and Filter while keeping delegation in mind so large data sources like SharePoint or Dataverse remain fast. Moreover, the video uses simple, step-by-step examples that beginners can follow without prior advanced knowledge.

What the Video Covers

The video walks viewers through the difference between Sort and SortByColumns, and it shows how to sort on multiple columns dynamically. In addition, it explains how to combine multiple filter criteria and add visual indicators for sorting and filtering state. The presenter demonstrates formulas and live examples so viewers can see immediate results and adapt them to their own data sources.

Core Functions and How They Work

At the center of the tutorial are the familiar Power Apps functions, particularly Filter, Sort, and SortByColumns, which can be chained for more complex queries. The video clarifies when to prefer SortByColumns for multi-column sorts and when a simple Sort or a custom formula is enough. Additionally, it touches on Search for text queries and how these functions interact when combined.

Dynamic Multi-Column Sorting and UI

Reza demonstrates how to let users click column headers to toggle ascending and descending order, and how to build a UI that supports sorting on multiple columns with modifier keys or controls. He also adds icons to show the current sort direction, which enhances usability and reduces confusion. However, implementing those visual cues involves tradeoffs because extra controls can complicate the app and increase development time.

Delegation: Tradeoffs and Performance

The video stresses delegation as a key consideration when working with large datasets, because non-delegable operations force the app to retrieve the full table before processing, which hurts performance. Consequently, Reza recommends checking which functions and columns are delegable for data sources like SharePoint and Dataverse, and then redesigning queries to stay within those limits. Yet, such constraints create tradeoffs: you may need to simplify your logic or add server-side views, and that can reduce flexibility or increase backend work.

Balancing Flexibility and Maintainability

Furthermore, the tutorial shows how dynamic sorting adds flexibility for end users, while static formulas keep the app easier to maintain. For example, building a dynamic list of sort columns gives users power, but it also requires careful state management and additional testing. Thus, the choice is a balancing act between user empowerment and long-term maintainability.

Practical Tips and Common Challenges

In practice, Reza recommends starting with delegable columns and then adding client-side handling only when necessary, which reduces the risk of slow queries. He also suggests using clear visual feedback so users understand what filters and sorts are active, and documenting known delegation limits for future maintainers. Still, developers will face challenges such as inconsistent column types, mixed-case text comparisons, and differences in delegable functions between connectors, which all require thoughtful workarounds.

Key Takeaways for App Makers

Overall, the video offers a compact set of best practices: prefer delegable queries, use SortByColumns for structured multi-column sorts, and add UI indicators to improve clarity. Moreover, it highlights that while advanced dynamic features improve user experience, they can introduce complexity and possible performance issues if delegation is ignored. Therefore, developers should weigh the tradeoffs carefully and test with realistic dataset sizes before deployment.

Power Apps - Power Apps: Sort/Filter + Delegation

Keywords

Power Apps sort and filter, Power Apps multiple column sort, Power Apps filter multiple columns, Delegation in Power Apps, Power Apps delegation tips, Advanced Power Apps filtering, Power Apps sort functions, Power Apps filter performance