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 / How to filter a galler...
Power Apps
Answered

How to filter a gallery based of the count of another list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

SPList1 = Event List

SPList2 = Signup form for event list

 

Here is the process. SPList1 has all the events available for sign up and it has a column called Volunteers Needed which is the number of people needed for each event

 

SPList 2 is the signup sheet. 

 

I need to be able to filter out an event in a gallery when the count of signees for an event on SPList2 equals the number of volunteers needed on SPList1

 

The filter code below doesn't work. Do I need to create a second collection instead?

Any help would be awesome

 

Filter(SPList1,
         EventType="Project",
        EventSupportSearchDate<=Today(),
       SupportStaffNeeded= true,
       EventSupportSearchDate<=Today(),
      LastDaytoRegister>=Today(),
     Not(EventName in UserSignUpList.EventName),
    EventLeader.DisplayName<>Var_OfficeName,
   EventName && VolunteersNeeded=(CountRows(Filter(SPList2, EventName))))

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You can use this to build on to your event list. This would replace the general SPList1 reference in your filter.

     

    AddColumns(SPList1,"EventFull",CountRows(Filter(SPLst2,EventID=[@EventID]))>=NumberOfSupportStaffNeeded)

     

     Here is the docs for AddColumns()

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you! This worked great!

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 339 Most Valuable Professional

#2
11manish Profile Picture

11manish 180

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard