Are you facing any delegation while working with Power Apps Filter Gallery By Date Range? This Power Apps tutorial explains the Power Apps filter gallery by date range delegation.
Also, we will see how to overcome this Power Apps delegation while working with the Power Apps filter gallery by date range.
Here, I have explained two various ways/methods to work with the Power Apps filter gallery by date range delegation. Such as:
- By using Power Apps Variables
- By using Power Apps Collection
Power Apps Filter Gallery By Date Range Delegation
- For example, I have a Power Apps gallery. While working with the Power Apps filter gallery by date range, I am getting the last 5 days’ records.
- Also, I faced a delegation warning [Yellow triangle], as in the screenshot below. The warning message appears as “Delegation warning. The highlighted part of this formula might not work correctly on large data sets. The “Add” operation is not supported by this connector.“.

Scenario:
- I have a SharePoint Online list named “Expense Tracker”. This list contains the below fields. Such as:
Column Name | Data Type |
Item | This is a Title column with a single line of text. I just renamed it to “Item” |
Category | Choice |
Payment Date | Date and time |
Amount | Number |

- Then, open the Power Apps canvas app -> Insert a Gallery control [gal_Last5DaysRecords] and set its Items property as:
Items = Filter(
'Expense Tracker',
'Payment Date' < (Today() - 5)
)
Where,
- Filter() = This Power Apps Filter() function find a set of record that match one or more criteria
- ‘Expense Tracker’ = SharePoint Online List
- ‘Payment Date’ = SharePoint date field column
- <(Today()-5) = Power Apps Today() function finds the current date and ‘-5’ is the number of previous days // You can change the number of days
Refer to the below image:

- Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Last 5 Days Records], and provide a delegation warning like below.

To overcome this Power Apps delegation warning, follow the two approaches below. Such as:
- By using Power Apps, Variables
- By using Power Apps Collection
Method 1: By using Power Apps Variables
We can use Power Apps variables to overcome the Power Apps filter gallery by date range delegation.
Refer to the below screenshot:

To achieve the above example, follow the below-mentioned steps.
- Open the Power Apps canvas app -> Select “App” and set its OnStart property as:
OnStart = Set(
StartDate,
Today() - 5
);
Set(
EndDate,
Today()
);
Where,
- Set() = This function helps us to set a value of a global variable
- StartDate, EndDate = Power Apps global variable names
- Today() – 5 = This Today() function finds the current date, and ‘-5’ is the number of previous days // You can change the number of days

- Next, on the Power Apps Screen -> Insert a Gallery control and set its Items property code like below.
Items = Filter(
'Expense Tracker',
'Payment Date' > StartDate,
'Payment Date' <= EndDate
)
Where,
- ‘Expense Tracker’ = SharePoint Online List
- ‘Payment Date’ = SharePoint Date Field
- StartDate, EndDate = Global Variables

- Run OnStart, Save, Publish, and Preview the app. The gallery will display the filtered records, i.e., [Previous 5 Days Records] without Power Apps delegation.

Method 2: By using Power Apps Collection
We can use the Power Apps collection to overcome or fix the Power Apps filter gallery by date range delegation.
Refer to the below image:

To do so, follow the below steps. Such as:
- Open the Power Apps canvas app -> Select “App” object -> Select OnStart and set its property as:
OnStart = ClearCollect(
colExpenses,
'Expense Tracker'
)
Where,
- colExpenses = Power Apps Collection
- ‘Expense Tracker’ = SharePoint Online List

- Next, on the Power Apps Screen -> Insert a Gallery control -> Set its Items property as:
Items = With(
{
StartDate: Today()-5,
EndDate: Today()
},
Filter(
colExpenses,
'Payment Date' > StartDate,
'Payment Date' <= EndDate
)
)
Where,
- With() = This function can help us to evaluate a formula for a single record
- StartDate, EndDate = Power Apps scope variables
- colExpenses = Power Apps collection
- ‘Payment Date’ = Collection date field

- Run OnStart, Save, Publish, and Preview the app. The gallery will display the filtered Collection records, i.e., [Previous 5 Days Records] without Power Apps delegation, as in the screenshot below.

These are the two ways/approaches to overcome the Power Apps filter gallery by date range delegation.
Conclusion
You will face a Power Apps delegation warning by date range while working with the Power Apps filter gallery.
Here, from this Power Apps tutorial, we learned in detail information about the Power Apps filter gallery by date range delegation.
Also, we discussed two various ways/methods to work with the Power Apps filter gallery by date range delegation. Such as:
- By using Power Apps Variables
- By using Power Apps Collection
Also, you may like some more Power Apps tutorials:
- Power Apps Filter Gallery By Month
- Power Apps Filter Gallery By Quarter
- Power Apps Filter Gallery By Year [Current, Next, Next N, Previous, Previous N]
- Power Apps Filter Gallery By Days
- Filter Power Apps Gallery By Multiple Dropdowns
- Bind Power Apps Dropdown Control From SharePoint Yes No Column
Bijay Kumar Sahoo is a highly accomplished professional with over 15 years of experience in the field of SharePoint and related technologies. He has been recognized as a Microsoft MVP (Most Valuable Professional) more than 9 times, starting from April 2014, for his exceptional contributions to the SharePoint community. Bijay is also a prolific author, having written two books on SharePoint – “Microsoft Power Platform – A Deep Dive” and “SharePoint Online Modern Experience Practical Guide“. His deep insights into SharePoint are also shared on his popular YouTube channel EnjoySharePoint where he teaches SharePoint to a global audience (From various countries like the United States of America, Canada, the United Kingdom, Australia, New Zealand, etc). Read more…