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

DataTable - Summation of common records

Afternoon all,

 

I wanting to show a small report with the app as per what a person has acheived for a set period of time.

I have the below in a DataTable;

COLUMNA                           COLUMNB                         COLUMNC
DetailA1                                    DetailB1                                        1

DetailA1                                    DetailB1                                        1

DetailA2                                    DetailB2                                        1


Yet I want to sum the same details, hence show the above like the below.

COLUMNA                           COLUMNB                         COLUMNC
DetailA1                                    DetailB1                                        2

DetailA2                                    DetailB2                                        1

 

Cheers,

 

Lazz

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: DataTable - Summation of common records

Hi Lazz,

The GroupBy documentation shows an example on how to sum a group of records.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-groupby

 

In your case, the formula you would use would look like this:

 

AddColumns(GroupBy(MyData, "COLUMNA","COLUMNB", "GroupedData"),
"Sum_C",
Sum(GroupedData,COLUMNC)
)

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: DataTable - Summation of common records

Hi Lazz,

The GroupBy documentation shows an example on how to sum a group of records.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-groupby

 

In your case, the formula you would use would look like this:

 

AddColumns(GroupBy(MyData, "COLUMNA","COLUMNB", "GroupedData"),
"Sum_C",
Sum(GroupedData,COLUMNC)
)

View solution in original post

Highlighted
Anonymous
Not applicable

Re: DataTable - Summation of common records

Morning timl,

Legend, thanks for the help.
This worked a treat.

 

Lazz

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (11,450)