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 / Calculate the sum of e...
Power Apps
Answered

Calculate the sum of each row based on the column in Power Apps.

(0) ShareShare
ReportReport
Posted on by 85

Hi there,

 

I am having some difficulties on creating the formula to calculate the sum of of each rows (Quantity) based on the columns (Part Number) and store the total sum in column named "Total Quantity".

Ex: Part Number = E-000001, Total Quantity is 27.

 

Can anyone help me on doing this, because I didn't found any tutorial on this. Thanks in advance.

Stock In Latest.PNG

Categories:
I have the same question (0)
  • Verified answer
    Samuel-Zhou Profile Picture
    393 on at

    @Az8PnG Hi,You can try this Code,

     

    Sum(Filter('list_name', Part Number = "E-000001"), Quality)
  • Az8PnG Profile Picture
    85 on at

    Hello Mr @Samuel-Zhou , thanks for your help.

    How about if I wanted to find the sum for every part number?How was the formula is going to look like?

  • Samuel-Zhou Profile Picture
    393 on at

    @Az8PnG Hi,you can try this code,

     

    GroupBy( SortByColumns( 'Your SharePoint List Name', "Part Number", Ascending ), "Part Number", "Part Number Sum", Sum(Quality) )
  • Az8PnG Profile Picture
    85 on at

    Thank you Mr @Samuel-Zhou .

     

    My code is:

    GroupBy(SortByColumns('StockInLatests',"cre39_partnumber",SortOrder.Ascending),"cre39_partnumber","cre39_totalquantity",Sum(ThisItem.Quantity))

     

    I am having some error in this code which are: GroupByError.PNG

    and

    Error 2.PNG

     

    May I know why is this errors occurs?

     

    I will show you my column name as well:

    1. For Part Number PartName.PNG

    2. For Quantity

    Quantity.PNG

    3. For Total Quantity

    TotalQuantity1.PNG

  • Az8PnG Profile Picture
    85 on at

    Thank you Mr @Samuel-Zhou .

     

    My code is:

    GroupBy(SortByColumns('StockInLatests',"cre39_partnumber",SortOrder.Ascending),"cre39_partnumber","cre39_totalquantity",Sum(ThisItem.Quantity))

     

    I am having some error in this code which are: GroupByError.PNG

    and

    Error 2.PNG

     

    May I know why is this errors occurs?

     

    I will show you my column name as well:

    1. For Part Number PartName.PNG

    2. For Quantity

    Quantity.PNG

    3. For Total Quantity

    TotalQuantity1.PNG

  • Samuel-Zhou Profile Picture
    393 on at

    @Az8PnG Try this,

     

     

    AddColumns(
     GroupBy(
     AddColumns(
     StockInLatests,
     "Part Group",
     'Part Nubmer',
     "Quan",
     ThisRecord.Quantity
     ),
     "Part Group",
     "Quan"
     ),
     "QuanSum",
     Sum(
     ThisRecord.Quan,
     Quantity
     )
    )

     

  • Az8PnG Profile Picture
    85 on at

    Hi @Samuel-Zhou just try the code above. I just can't fix the problem yet. Do you mind if we discuss about this maybe in teams or skype?

  • Samuel-Zhou Profile Picture
    393 on at

    @Az8PnG Hi,we can use private message to discuss

  • Az8PnG Profile Picture
    85 on at

    Hello@Samuel-Zhou do u received my message?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,009

#2
11manish Profile Picture

11manish 672

#3
Valantis Profile Picture

Valantis 628

Last 30 days Overall leaderboard