web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Adding a Filter to a Groupby for a Gallery

(0) ShareShare
ReportReport
Posted on by 302
My current code for the home gallery 
GroupBy(AddColumns(Grants,ProjectText,Project.Value),ProjectText,Data)
 
Description: I am building a platform for users to mark tasks that are assigned to them complete/put on hold/make comments on them.

My problem is on home screen I have everything grouped by the Project choice column in a sharepoint list. I would like to filter it out to only show users projects that they have tasks assigned to them.

How could this be accomplished?
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,827 Super User 2025 Season 2 on at
    Adding a Filter to a Groupby for a Gallery
    Wouldn't you just replace Grants in your GroupBy with something like Filter(Grants, column in grants = the current user) ?
    How do you identify the projects assigned to a user? Did you use User() to associate the projects with a user?
     
  • Suggested answer
    CU07111156-1 Profile Picture
    6 on at
    Adding a Filter to a Groupby for a Gallery
    Hi

    Hopefully I've understood this request, my suggestion:  Filter the results before grouping
    GroupBy(
     AddColumns(
      Filter( Grants, user = current user ),
     ProjectText,Project.Value),
    ProjectText,Data)

    Alternatively, Filter the Resulting group
    Filter(
     GroupBy(AddColumns(Grants,ProjectText,Project.Value),ProjectText,Data),
     user = current user).

    Depending on the layout / Home screen you could also add a "Show My Tasks" Button / Toggle and add a IF to the filter
    Something along the lines of 
     If "My Tasks" equal true
     then Filter & Groupby xyz
     else GroupBy xyz.

    Hope that helps

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard