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 / 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard