GROUPBY

GROUPBY(row_fields, values, function [,field_headers] [,total_depth] [,sort_order] [,filter_array] [,field_relationship]))

Returns the grouping of your data along one axis and aggregates the associated values.

row_fieldsA column-oriented array or range that contains the values which are used to group rows and generate row headers.
valuesA column-oriented array or range of the data to aggregate.
functionAn explicit or eta reduced lambda (SUM, PERCENTOF, AVERAGE, COUNT, etc) that is used to aggregate values.
field_headers(Optional) Whether the "row_fields" and "values" have headers:
0 = no headers
1 = yes, but don't show
2 = no headers, but generate them
3 = yes and show
total_depth(Optional) Determines whether the row headers should contain totals:
0 = no totals
1 = Grand Totals at bottom
2 = Grand and Subtotals at bottom
-1 = Grand totals at top
-2 = Grand totals and Subtotals at top
sort_order(Optional) A number indicating how rows should be sorted.
filter_array(Optional) A column-oriented 1D array of Booleans that indicate whether the corresponding row of data should be considered.
field_relationship(Optional) The relationship fields when multiple columns are provided to "row_fields":
0 = Hierarchy (default)
1 = Table

REMARKS
* This is a Preview Function which means the signature and results may change before being officially released.
* This function was added in Microsoft 365.
* This function can create a Dynamic Array Formula.
* The "row_fields" must have at least 2 columns
* If "field_headers" is left blank, then headers are not shown
* PivotBy can group data both in rows and columns
* GroupBy can only group data in rows
* You can use the PIVOTBY function to return the grouping of your data along two axis and aggregates the associated values.
* link - insider.microsoft365.com/en-us/blog/new-aggregation-functions-in-excel-groupby-and-pivotby
* This function was first released in December 2023.
* For the Microsoft documentation refer to support.microsoft.com

 A
1??


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top