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 a gallery ba...
Power Apps
Answered

Filtering a gallery based on another gallery and a condition

(0) ShareShare
ReportReport
Posted on by 15

Hi guys,

 

I need your help again.

I have 2 galleries in my App, the gallery on the left is called FilterGallery which contains a list of categories from a SharePoint list name CategoryList. The gallery on the right is ViewGallery which contains the list from another SharePoint list name BD Tracker.

2 galleries.png

 

I am using the FilterGalley to filter ViewGallery according to the selected category. I have found a formula online and it works perfectly but now I want to add this condition ('BD Tracker'.Priority="High") on the filter formula . 

I tried adding it on the IF condition but it gave me error.

 

This is the current "working" formula used: 

Angiellyn01_0-1660624822685.png

I appreciate all the help. Thank you in advance!

 

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,

    can you please copy and paste the formula here so that it will be easier for me check it

  • Angiellyn01 Profile Picture
    15 on at

    @NandiniBhagya20 

     

    here is the formula i found online:

     

    SortByColumns(If(type="All Projects",'BD Tracker',
     type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     Filter('BD Tracker',type in CategoryList.Value)),"Project")

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at
    SortByColumns(If(type="All Projects",'BD Tracker',
     If(type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id && Priority = "High")//If Priority is choice type then Priority.Value = "High"
    ,
     If(type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     Filter('BD Tracker',type in CategoryList.Value)))))))))))),"Project", Ascending)
  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at
    SortByColumns(If(type="All Projects",'BD Tracker',
     If(type="New", Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="TOP 3 - MY",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id && Priority = "High")//If Priority is choice type then Priority.Value = "High"
    ,
     If(type="TOP 3 - SG",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Pitching/Developing",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Projects on Hold",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Pending Client Decision",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Won",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="Lost/Decline/Aborted",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="AOB",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     If(type="OTR",Filter('BD Tracker',FilterGallery.Selected.ID=CategoryList.Id),
     Filter('BD Tracker',type in CategoryList.Value)))))))))))),"Project", Ascending)
  • Angiellyn01 Profile Picture
    15 on at

    @NandiniBhagya20  that works perfectly! thank you so much..

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