cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

How to Sum and groupby

Hi, 

 

I have a SharePoint List with, 

  • Loan ID
  • Year
  • Outstanding Amount

I want to create a collection to see, 

  • Yes
  • Total Outstanding

E.g 

 

SPList

Loan ID--------Year-------Outstanding Amount

1---------------2019-------500000

2---------------2019-------450000

3---------------2020-------350000

 

I want the collection as, 

 

Year--------Total Outstanding Amount

2019-------950000

2020-------350000

 

I tried groupby but could not figure out

 

Osmand

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How to Sum and groupby

Hey @OsmandFernando 

 

In this case, you can use the expression as:

AddColumns(GroupBy(SPListName,"Year","Grouped"),"SumReturned",Sum(Grouped,Amount))
The SumReturned column contains the sum of amounts in a specific year.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: How to Sum and groupby

Hey @OsmandFernando 

 

In this case, you can use the expression as:

AddColumns(GroupBy(SPListName,"Year","Grouped"),"SumReturned",Sum(Grouped,Amount))
The SumReturned column contains the sum of amounts in a specific year.

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Re: How to Sum and groupby

@yashag2255 Thank you so much, Your solution worked for me and also I learned a lot. Thank you again

 

Osmand

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,745)