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 wi...
Power Apps
Answered

Filtering a gallery with a collection vs directly from Sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone, 

I have  an app that has a visualization matrix for risks built up of 25 different galleries. Each gallery has a different filter, filtering two choice columns from SharePoint. Now I have to copy the app and change all the data connections, so I want to change the galleries to be filtering on a collection so that i only have to change the connection to the collection once. 

The code I used for the Sharepoint list version is f.ex. the following: 

Filter(Risklist, Likelihood.Value = 1, Impact.Value = 5)

Then I changed it get the info from a collection containing the same info, but this unfortunately didn't work. 
Filter(RisklistCollection, Likelihood.Value = 1, Impact.Value = 5)

 

However, if I change it to the following code it works again. 

Filter(RisklistCollection, "1" in Likelihood.Value, "5" in Impact.Value) 

 

If someone could explain me what is happening in the background with the storage and referencing of the columns that would be greatly appreciated. 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,538 Most Valuable Professional on at

    Hi @Anonymous ,

    I am surprised the first one works - Choice fields are Text (not numeric) - this should work for both

    Filter(
     RisklistCollection/RiskList, 
     Likelihood.Value = "1" && Impact.Value = "5"
    ) 

     or this

    Filter(
     RisklistCollection/RiskList, 
     Value(Likelihood.Value) = 1 && Value(Impact.Value) = 5
    ) 

     

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you very much @WarrenBelz both of your suggestions worked perfectly. 

    Yes, the first one was functioning but the yellow warning signs were going off everywhere. So good to get rid of those anyway. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard