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 / Filter and Sum a Colle...
Power Apps
Answered

Filter and Sum a Collection

(0) ShareShare
ReportReport
Posted on by 220

Hi, hoping someone can help...I have a collection and I'm trying to sum two columns together in the collection.  The sumtotal is blank???  

 

I have Items = AddColumns(GroupBy(Filter(collectRecordMulti, Date >=varPayPeriodApproval2.StartDate && Date <= varPayPeriodApproval2.EndDate && Status.Value = "Approved"), "GIN", "GroupedGIN"), "NumRows", CountRows(GroupedGIN), "Sum_BonusRateValue", Sum(GroupedGIN, BonusRateValue), "Sum_DailyBonus", Sum(GroupedGIN, DayTotal), "SumTotal", Sum(GroupedGIN, "Sum_BonusRateValue"+"Sum_DailyBonus"))

TB05_0-1630517430620.png

 

 

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @TB05 

     

    Can you try this

     

    AddColumns(GroupBy(Filter(collectRecordMulti, Date >=varPayPeriodApproval2.StartDate && Date <= varPayPeriodApproval2.EndDate && Status.Value = "Approved"), "GIN", "GroupedGIN"), "NumRows", CountRows(GroupedGIN), "Sum_BonusRateValue", Sum(GroupedGIN, BonusRateValue), "Sum_DailyBonus", Sum(GroupedGIN, DayTotal),
    
     "SumTotal",
     Sum(
     GroupedGIN,
     Sum(
     Sum(
     GroupedGIN,
     BonusRateValue
     ),
     Sum(
     GroupedGIN,
     DayTotal
     )
     )
     )
    
    )

     

     

  • TB-20081424-0 Profile Picture
    220 on at

    Thank you, I'm not familiar with the WITH function.  I'm trying to work with it and I continue to get invalid number of arguments and SUM has invalid arguments.

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @TB05 

     

    I have updated the formula above to simplify. Did you try this? Similar to one that you have been working.

     

    AddColumns(GroupBy(Filter(collectRecordMulti, Date >=varPayPeriodApproval2.StartDate && Date <= varPayPeriodApproval2.EndDate && Status.Value = "Approved"), "GIN", "GroupedGIN"), "NumRows", CountRows(GroupedGIN), "Sum_BonusRateValue", Sum(GroupedGIN, BonusRateValue), "Sum_DailyBonus", Sum(GroupedGIN, DayTotal),
    
     "SumTotal",
     Sum(
     GroupedGIN,
     Sum(
     Sum(
     GroupedGIN,
     BonusRateValue
     ),
     Sum(
     GroupedGIN,
     DayTotal
     )
     )
     )
    
    )

     

     

  • TB-20081424-0 Profile Picture
    220 on at

    Thanks for your quick response, that worked for me!

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard