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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sum column with Filter...
Power Apps
Unanswered

Sum column with Filter & group by?

(0) ShareShare
ReportReport
Posted on by 64

Hi all, I have been going at this for a while. I have a list with the data shown in a gallery:

 

Name, Award Amount, Month, and Date Awarded. I was able to create a radio control where when the Month is selected, the filter will show only items for that month. Works great, but has a delegation to pop up. The issue is, that a person can be awarded more than once in a month, and I want to show the total awarded in the Awarded column instead of displaying multiples. How would I update the filter to show this? I'm stuck on using Groupby with Sum.

 

Filter used on gallery : Filter(Awards,Text(Created,"[$-en-US]mmmm") = Radio1.Selected.Value)

 

 

In the screenshot, the gallery displayed with radio control:

bwebmasta_0-1713462937904.png

The second question is, how can I avoid the delegation warnings showing on my total awarded, and total people awarded?

Filter used to show total awarded for the month on the right: Sum(Filter(Awards,Text(Created,"[$-en-US]mmmm") = Radio1.Selected.Value), 'Amount Awarded')

 

Filter used to display total awarded people: 

CountRows(Filter(Awards,Text(Created,"[$-en-US]mmmm") = Radio1.Selected.Value))

 

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @bwebmasta - see below:

     

    Filter(
     DropColumns(
     AddColumns(
     AddColumns(
     GroupBy(
     Awards,
     Name,
     GroupedItems
     ),
     'Total Awarded',
     Sum(
     GroupedItems,
     'Award Amount'
     )
     ),
     'Date Awarded',
     First(GroupedItems).'Date Awarded',
     'Date Awarded Month',
     Text(
     First(GroupedItems).'Date Awarded',
     "mmmm"
     )
     ),
     GroupedItems
     ),
     'Date Awarded Month' = Radio1.Selected.Value
    )

     

    Please note despite the lack of a warning message, "shaping" or "transform" functions like AddColumns and GroupBy are not delegable.

  • bwebmasta Profile Picture
    64 on at

    I see, I would add this to the Items section on the gallery, correct? I will test it out. Question, how would I be able to use my Month selector (radio button) using this?

     

    Thanks Amik!

     

    I suppose I won't have to worry about delegation, as I set the limit to 1000, and usually in a month about 300-500 are the most that have been submitted to the list. 

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @bwebmasta - yes correct to be applied into the Items property of the Gallery. Note that the syntax above accommodates for the recent change to the required syntax for the GroupBy and AddColumns functions:

     

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-groupby 

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard