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

Gallery GroupBy

(1) ShareShare
ReportReport
Posted on by 1,231
I have the following for the Items of a gallery...
 
With(
    {
        _Data:
        Filter(
            ShortFormII_ACstData,
            Order = DataCardValue35.Text
        )
    },
    Filter(
        _Data,
        Value(Text('CostElement')) >= 800000
    )
)
 
Is it possible to GroupBy this information?
Categories:
I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    151,271 Most Valuable Professional on at
    Gallery GroupBy
    Hi @RJF61,
    Just add it the bottom part - you are already "local" with the output of _Data, so there are no Delegation restrictions after that.
    With(
       {
          _Data:
          Filter(
             ShortFormII_ACstData,
             Order = DataCardValue35.Text
          )
       },
       GroupBy(
          Filter(
             _Data,
             Value(Text('CostElement')) >= 800000
          ),
          GroupedColumnName,
          Grouped
       )
    )
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn  
  • RJF61 Profile Picture
    1,231 on at
    Gallery GroupBy
    Hi @WarrenBelz  Thanks for the response.  Believe I was making this too difficult.
     
    Do I need to use AddColumns/ShowColumns to display and then subtotal on the cost in the right column?  Essentially I want the GroupBy column with a subtotal and a "nested gallery" of the individual items below...
     
    Shops Sheet Metal  $ 1,594.58
         
     
    AZones IAQ Tech  $####
         
     
    AZones Electrical  $####
         
     
     
  • WarrenBelz Profile Picture
    151,271 Most Valuable Professional on at
    Gallery GroupBy
    Hi @RJF61,
    Using your grouped field name and assuming that CostElement is the numeric field to be totalled, your Parent gallery Items would be
    With(
       {
          _Data:
          Filter(
             ShortFormII_ACstData,
             Order = DataCardValue35.Text
          )
       },
       AddColumns(
          GroupBy(
             Filter(
                _Data,
                Value(Text('CostElement')) >= 800000
             ),
             YourGroupedField,
             Grouped
          ),
          Sum(
             Grouped,
             CostElement
          )
       )
    )
    and your Child gallery Items would be
    ThisItem.Grouped
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn  

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 829 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 570

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 403 Super User 2025 Season 2

Last 30 days Overall leaderboard