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 gallery ...
Power Apps
Unanswered

how to filter gallery by multi person?

(0) ShareShare
ReportReport
Posted on by 57

I have 2 lists.

First one contains users' information with column called "Class" and "User"

ClassUser
APaul McCartney
BJohn Lennon
CRingo
AGeorge Harr

 

Second one contains information of events that users are participating in,

EventParticipants
Event1Paul McCartney, Ringo, Ronaldo, Ronaldinho
Event2Beckham, John Lennon
Event3Zidane

 

 

Now I have a dropdown of "Class" and want to filter the second Event gallery based on the User.

So, if I choose "A" in my Class dropdown, I want to see the items that Paul McCartney 'OR' George Harr (they are in Class A) is one of the participants of the event. This case it should be only 'Event1'.

 

I tried the code below

 

Filter(Event, Participants.Email in Distinct(Filter(UserInfo, Class = DropDown.Selected.Result), User.Email).Result)

 

 

Doesn't work..... any help?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,927 Most Valuable Professional on at

    Hi @beatlefreak ,

    Try this format

    With(
     {
     wUser:
    	 AddColumns(
     Filter( 
     UserInfo,
     Class = DropDown.Selected.Result
     ),
     "UserMail",
    		 User.Email
     )
     },
     Ungroup(
     ForAll(
     wUser As aUsers,
     Filter(
     Event,
     aUsers.UserMail in Participants.Email
     )
     ),
     "Value"
     )
    )

    Note I have assumed some field names from your code (which is different to the image)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard