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 / Date filter dropdown
Power Apps
Unanswered

Date filter dropdown

(0) ShareShare
ReportReport
Posted on by 103

Hi everyone

 

I have got an app which uses a SharePoint list to store data about actions that need to be completed.  One of the columns in this list is a target date for the action to be completed and I want users to be able to filter by this date using the dropdown below:

 

gjayne1984_0-1649149715956.png

 

To do this I've used the formula below in the Items property of the gallery that holds the actions list:

 

Filter(ActionList,
dd_DateFilter.Selected.Value = "All"
||
Switch(dd_DateFilter.Selected.Value,
"Today", TargetDate = Today(),
"Next 7 days", (TargetDate <= Today()+7) && TargetDate > Today(),
"Overdue", TargetDate < Today()
)
)

 

This works fine and displays the correct records in the gallery but due to the Switch statement I'm getting a delegation warning.  I can see that using an if or switch in a filter isn't delegable so I wondered if anyone could see a way of getting a similar result without using either of these, as so far I haven't been able to?  I need to avoid any delegation warnings as when this app is in production the list will be over 2000 items.

 

Any help or pointers would be gratefully received.  Thanks in advance.

Categories:
I have the same question (0)
  • shoog Profile Picture
    2,164 on at

    You could move the Switch out of the Filter statement to get rid of the delegation warning, something like

    Switch(dd_DateFilter.Selected.Value,
     "All", ActionList,
     "Today", Filter(ActionList, TargetDate = Today())
    )

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard