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 / Filter Gallery by Choi...
Power Apps
Answered

Filter Gallery by Choice Column in SP List

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

I have a SP List with a number of entries and I have added a choice column to differentiate between different campaigns. 

 

How do I filter the Gallery in my Power App to only show entries from a specific Campaign? 

 

At the moment the formula for the Items in the gallery is: 

Sort(AddColumns(GroupBy(MilesChallenge,"Title","OtherData"),"TotalMiles",Sum(OtherData,Miles)),TotalMiles,Descending)
 
Because I needed to add together the total miles logged by a user. What I'm struggling to work out is how to incorporate the filter part into this. Any help would be appreciated, thanks. 
Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @BT168 

    Please consider changing your Formula to the following:

    Sort(
     AddColumns(
     GroupBy(
     Filter(MilesChallenge, yourStatusColumn.Value = yourCriteria),
     "Title",
     "OtherData"
     ),
     "TotalMiles", Sum(OtherData,Miles)
     ),
    TotalMiles,Descending)

     

    I hope this is helpful for you.

  • BT168 Profile Picture
    Microsoft Employee on at

    That's worked great, thank you @RandyHayes !

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 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard