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 / Gallery collection fil...
Power Apps
Answered

Gallery collection filter not working

(0) ShareShare
ReportReport
Posted on by 136

Hello,

 

i would like some help with a gallery filter. 

i have this collection: 

 

nattt7_0-1698990541972.png

 

And this FIlter:   Distinct(colAll, Term)

 

and here the gallery Items:

 

If( FilterTerm.Selected.Value = Blank(),
SortByColumns(
Search(
Filter(
colAll,
And(
StartDate >= DateAdd( Today(), - Weekday( Today(), StartOfWeek.Monday)-7, TimeUnit.Days),
StartDate <= DateAdd(Today(), 1 - Weekday( Today(), StartOfWeek.Monday ) + 240, TimeUnit.Days ),
Term = FilterTerm.Selected.Value
)
),
txtNameFilter.Text, "Description"
),
"StartDate"
),
SortByColumns(
Search(
Filter(
colAll,
And(
StartDate >= DateAdd( Today(), - Weekday( Today(), StartOfWeek.Monday)-7, TimeUnit.Days),
StartDate <= DateAdd(Today(), 1 - Weekday( Today(), StartOfWeek.Monday ) + 120, TimeUnit.Days ),
Term = FilterTerm.Selected.Value
)
),
txtNameFilter.Text, "Description"
),
"StartDate"
)
)

 

I want all rows visible when filters are not applied and that is not happening. Also the filter only works with a few items not all.

Any ideas? Thank you 

 

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @nattt7 ,

     

    Please try below formula:

    If( FilterTerm.Selected.Value = Blank(),
    SortByColumns(
    Search(
    Filter(
    colAll,
    And(
    StartDate >= DateAdd( Today(), - Weekday( Today(), StartOfWeek.Monday)-7, TimeUnit.Days),
    StartDate <= DateAdd(Today(), 1 - Weekday( Today(), StartOfWeek.Monday ) + 240, TimeUnit.Days)
    )
    ),
    txtNameFilter.Text, "Description"
    ),
    "StartDate"
    ),
    SortByColumns(
    Search(
    Filter(
    colAll,
    And(
    StartDate >= DateAdd( Today(), - Weekday( Today(), StartOfWeek.Monday)-7, TimeUnit.Days),
    StartDate <= DateAdd(Today(), 1 - Weekday( Today(), StartOfWeek.Monday ) + 120, TimeUnit.Days ),
    Term = FilterTerm.Selected.Value
    )
    ),
    txtNameFilter.Text, "Description"
    ),
    "StartDate"
    )
    )

     

    For the terms, have you checked the result of Distinct(colAll, Term), by selecting this formula on formula bar and see in the dropdown?

     

    Best regards,

  • Verified answer
    nattt7 Profile Picture
    136 on at

    Thank you ! It works now... I forgot to change the +days.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard