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 / Apply multiple filters...
Power Apps
Answered

Apply multiple filters on Gallery Items

(0) ShareShare
ReportReport
Posted on by 189

Hi

 

So I have read a couple of posts around Multiple Filtering with the List but could not get the exact idea as the solutions were a bit specific to their needs. 

 

I have my own scenario and here I would like to explain. I have got a custom collection;

 

 

FilterList,
{
FilterName: "Scheduled",
IsFiltered: false
},
{
FilterName: "Started / In Progress",
IsFiltered: true
},
{
FilterName: "Finished / Completed",
IsFiltered: false
},
{
FilterName: "Due",
IsFiltered: true
}

 

I have got a Gallery that is bound to another collection which have got a same Statuses as FilterNames ("Scheduled, "Due" etc.)

 

My question is, what's the best way to filter my items in the Gallery based upon the filter's IsFiltered property to true? I can have 2, 3, 4 or even 1 filter setup at any point of time and my list should be able to be filtered by that. 

 

The way I was trying was: 

 

Filter(MyCollection, // collection
 If(CountIf(Filters, IsFiltered) > 0, // condition 
 CountIf(Filters, FilterName in "In Progress") > 0, // nested condition
 ('Status' in "In Progress"), // if condition is true
 CountIf(Filters, FilterName in "Scheduled") > 0,
 ('Status' in "Scheduled"), // if condition is true
 true))

 

Do you think there is a better way of achieving the objective (stated above)? Or am I doing it perfectly well. 😛

 

Looking forward to learn from the experts. 

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @ArafatTehsin ,

     

    What is the column type of 'Status'?

    If 'Status' is Text column, please try this:

     

    Filter(MyCollection,
     If(LookUp(FilterList,FilterName="Scheduled").IsFiltered, Status="Scheduled")||
     If(LookUp(FilterList,FilterName="Started / In Progress").IsFiltered, Status="Started / In Progress")||
     If(LookUp(FilterList,FilterName="Finished / Completed").IsFiltered, Status="Finished / Completed")||
     If(LookUp(FilterList,FilterName="Due").IsFiltered, Status="Due")
    )

     

    If 'Status' is Choices column, please try this:

     

    Filter(MyCollection,
     If(LookUp(FilterList,FilterName="Scheduled").IsFiltered, Status.Value="Scheduled")||
     If(LookUp(FilterList,FilterName="Started / In Progress").IsFiltered, Status.Value="Started / In Progress")||
     If(LookUp(FilterList,FilterName="Finished / Completed").IsFiltered, Status.Value="Finished / Completed")||
     If(LookUp(FilterList,FilterName="Due").IsFiltered, Status.Value="Due")
    )

     

     Hope this helps.

    Sik

  • Arafat Profile Picture
    189 on at

    What a fantastic way to do this. Thank you @v-siky-msft for this. It totally makes sense why nested IFs would make it an expensive operation. 

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
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard