Group By in Power Apps
Power Apps
31. Juli 2023 07:30

Group By in Power Apps

von HubSite 365 über Dhruvin Shah [MVP]

Microsoft MVP (Business Application & Data Platform) | Microsoft Certified Trainer (MCT) | Microsoft SharePoint & Power Platform Practice Lead | Power BI Specialist | Blogger | YouTuber | Trainer

Citizen DeveloperPower BeginnerPower AppsLearning Selection

During this video, we will talk about Group By function in Power Apps. Group by function in Power Fx has different Use cases. We will talk about those things in

The video discusses Group By function in Power Apps. Different uses of Power Fx's Group By function are covered in depth including its role in data aggregation. The GroupBy function returns a table with records grouped based on one or more column values. It also introduces a new column that contains a nested table of the remaining columns. The reverse process, accomplished by the Ungroup function, is also discussed. The Ungroup function breaks down any grouped records into separate records. The video tutorial provides a well-structured learning experience, divided into chapters and punctuated by opportunities to subscribe.

  • 00:00 - Start
  • 00:30 - Group By Use Case
  • 01:00 - Power Fx - Group By
  • 02:32 - Group By Result
  • 03:50 - UnGroup Use Case
  • 04:40 - Power Fx - UnGroup
  • 05:52 - Group by as Aggregation
  • 09:04 - Subscribe!

Summary:

The function GroupBy in Microsoft's Power Apps is used to group together records based on the values of one or more columns of a given table. It returns a table with a column that contains a nested table of the remaining columns. 

The opposite function UnGroup breaks into separate records any records that were grouped together.

The process would look like this:

  1. Use GroupBy to group records.
  2. Use Filter to remove the entire group of records.
  3. Use UnGroup to break up the records.

Additionally alongside functions such as AddColumns, Sum, Average, and other aggregate functions, we can use GroupBy to aggregate results based on a grouping. Then the DropColumns function can be used to drop the group table.

One more important thing to know about the GroupBy and UnGroup functions is that they don't modify a table but then take a table as an argument and return a different table.

The syntax for GroupBy is as follows:

GroupBy(table, columnname1 [, columnname2, ... ], groupColumnName )

  • 'table' is the table to be grouped.
  • 'columnname(s)' are the column names by which the records are grouped.
  • 'groupColumnName' is the column name for storing record data not included in columnname(s).

Note: For SharePoint and Excel data sources, columns with space in their names should be specified with "x0020" replacing the spaces. For example, specify "column name" as "column_x0020_name".

 

Detailed Discussion on Group By Function in Power Apps

Power Apps provide a unique feature, Group By function in Power Fx, used for data aggregation. This function groups records together based on their column values into a single record within a new table. It also adds a column with a nested table of remaining columns. A reverse operation of this process is UnGroup functionality, which separates grouped records into individual ones. This creates a versatile platform for power users keen on understanding and controlling their data effectively.

 

 

Learn about Group By in Power Apps

The Group By function in Power Apps is an incredibly useful tool for aggregating data. It allows one to group records together based on the values in one or more columns and add a column that holds a nested table of the remaining columns. The Ungroup function is the opposite of Group By and returns a table, breaking into separate records any records that were grouped together. This video will cover the different use cases of the Group By function, how to use it in Power Fx, the result of using it, use cases of the UnGroup function, how to use UnGroup in Power Fx, and using Group By as an aggregation. This video will be helpful for anyone looking to learn more about the Group By and UnGroup functions in Power Apps.

More links on about Group By in Power Apps

GroupBy and Ungroup functions in Power Apps
Feb 22, 2023 — The GroupBy function returns a table with records grouped together based on the values in one or more columns. Records in the same group are ...
Power Apps GroupBy Function example
Jun 17, 2021 — Power Apps GroupBy is a function that helps to return a table with items grouped together based on the values in one or multiple columns.
Microsoft Power Apps: Grouping Elements Together
In this tutorial, we're going to talk about the process of grouping elements together in Microsoft Power Apps and how it can make your app development ...
Power Apps Gallery Group By [With Real Examples]
Aug 30, 2022 — Power Apps GroupBy is a function used to return a table containing items that have been grouped based on the values in one or more columns.
PowerApps - How to use GroupBy
Oct 8, 2022 — GroupBy is a compelling command in PowerApps which helps to group to get sum or average. AverageGroupBySum. Post navigation. Previous Post:Power ...
Group By in Power Apps Gallery with Large SharePoint Lists
Feb 21, 2022 — We will explore the PowerApps GroupBy function to group data from SharePoint List & perform Grouping of data on SharePoint Choice column.

Keywords

PowerApps, Power Fx, Power Platform, Group By Function, UnGroup Function, Aggregation