KrewData Features > Commands > Group By |
Group By command groups and aggregates app records by the specified fields.
Tables cannot be used with Group By commands. If the input data contains a table, it is discarded on executing the command. |
Setting | Description |
---|---|
1. Select what fields identify the grouping | Select the field that holds items to be grouped. |
2. Select a field to aggregate that will fill the new field | Select the field where values to be aggregated are stored. |
3. Name a new aggregated field | Enter name of the new field that will store the aggregated value. |
4. Select how to aggregate the field |
Select the aggregation method. You can use any of the following methods depending on the field type.
|
The aggregation methods that can be used depends on the type of the field in which the value to be aggregated is stored. The aggregation methods that can be used for each field type are as follows.
Field type to be aggregated | Aggregation method | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Sum | Average | Median | Maximum | Minimum | Standard Deviation | Count | Count including Nulls | Count distinct values | Join into a string | |
Text | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Rich text | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Text area | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Number | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 |
Calculated (*1) | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 |
Radio button | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Checkbox | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Multi-choice | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Drop-down | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Date | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Time | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Date and time | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Attachment | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Link | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
User selection | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Department selection | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Group selection | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Lookup | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Record number | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 |
Created by | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Created datetime | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Updated by | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Updated datetime | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 |
(*1) When field having value to be aggregated is a calculated field, the selected aggregation may or may not be performed depending on the format of value stored in the calculated field. For example, when value stored in the calculated field is a number, all the aggregation methods can be applied. However, if that value is a text or a date, then aggregation method applicable to text or date field can only be performed. |
Field type to be aggregated | Aggregation method | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Sum | Average | Median | Maximum | Minimum | Standard Deviation | Count | Count including Nulls | Count distinct values | Join into a string | |
Status | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Worker | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 | ||||
Category | 〇 | 〇 | 〇 | 〇 | 〇 | 〇 |
This group demonstrates how to group data of an expense management app that records data on daily basis by Department and Account and aggregate the sum of Amount.
1. Select what fields identify the grouping | 2. Select a field to aggregate that will fill the new field | 3. Name a new aggregate field | 4. Select how to aggregate the field |
---|---|---|---|
・Department ・Account |
Amount | Amount | Sum |
This example demonstrates how to group project in charge data by Project Name and Date and concatenate the values of Person In Charge field to a string.
1. Select what fields identify the grouping | 2. Select a field to aggregate that will fill the new field | 3. Name a new aggregate field | 4. Select how to aggregate the field |
---|---|---|---|
・Project Name ・Date |
Person In Charge | Person In Charge | Join into a string Separator: Comma |