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.

Settings
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.
  • Sum
  • Average
  • Median
  • Maximum
  • Minimum
  • Standard Deviation
  • Count
  • Count including Nulls
  • Count distinct values
  • Join into a string
Aggregation Method

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 types of kintone

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.

App data other than kintone field types

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
Example (Sum)

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.

Input Data

Command Settings

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

Settings Page

Execution Result

Example (Join into a string)

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.

Input Data

Command Settings

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

Settings Page

Execution Result