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 / Filtering gallery in p...
Power Apps
Unanswered

Filtering gallery in powerapps

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

So I have some filters in powerapps to my gallery,

 

I've got a text field and then a drop down status - pretty simple

 

On my gallery items I have the following;

 

SortByColumns(
Filter(
'Request For Support',
(StartsWith(
Title,
TextInput1.Text
) || StartsWith(
'Created By'.Email,
TextInput1.Text
) || StartsWith(
ID,
TextInput1.Text
)) && ('Request Status'.Value = Dropdown1_2.Selected.Value || Dropdown1_2.Selected.Value = Blank())

),
"Created",
SortOrder.Descending
)

 

This works fine and I'm happy with it, however I want to expand it a little and have a filter date range too.

 

I tried using the below which I got from a tutorial 

 

And(
Or(
IsBlank(dpStartDate.Value),
'Created' >=dpStartDate.Value
),
Or(
IsBlank(dpEndDate.Value),
'Created' >=dpEndDate.Value
)
)

 

But I cant seem to get it to work with the code that I have already in place for my gallery item, would someone be able to point me in right direct?

 

Thanks

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Matt2024 

     

    Try this formula,

     

    SortByColumns( 
    Filter(
    'Request For Support',
    (StartsWith(Title, TextInput1.Text) || StartsWith('Created By'.Email, TextInput1.Text) ||
    StartsWith(ID, TextInput1.Text)) &&
    ('Request Status'.Value = Dropdown1_2.Selected.Value || Dropdown1_2.Selected.Value = Blank()) &&
    'Created' >= dpStartDate.SelectedDate && 'Created' <= dpEndDate.SelectedDate ),
    "Created", SortOrder.Descending
    )

    (Or)

     

    SortByColumns(
     Filter(
     'Request For Support',
     (StartsWith(Title, TextInput1.Text) || StartsWith('Created By'.Email, TextInput1.Text) || 
    StartsWith(ID, TextInput1.Text)) && ('Request Status'.Value = Dropdown1_2.Selected.Value || Dropdown1_2.Selected.Value = Blank()) && (IsBlank(dpStartDate.SelectedDate) || 'Created' >= dpStartDate.SelectedDate) && (IsBlank(dpEndDate.SelectedDate) || 'Created' <= dpEndDate.SelectedDate) ), "Created", SortOrder.Descending )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard