cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
timl
Super User
Super User

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
timl
Super User
Super User

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)
)
Anonymous
Not applicable

Morning timl,

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

 

Lazz

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,084)