Aggregation field
The aggregation field can pull together data from many different fields.
Settings
Aggregating table data
Aggregation fields can show relationships between multiple entries in a table. To connect an aggregation field to a table, follow these steps:
- Click the box that says Aggregate table data in the context of a single item of the process.
- Under Choose a flow to look up, select the form table you want to use from the available options.
- Select the field you want to aggregate.
- Select a function to apply to the field. Keep in mind that some functions may only work with certain types of fields.
Function name | Description | Allowed field types |
SUM | Displays the sum of all values | Number, Currency, Slider |
COUNT | Displays the number of values | Any type |
AVERAGE | Displays the average of all values | Number, Currency, Rating, Slider |
CONCATENATE | Combines two or more values | Text, Text area, Dropdown |
MIN | Displays the minimum value | Number, Currency, Date, Date & Time, Rating, Slider |
MAX | Displays the maximum value | Number, Currency, Date, Date & Time, Rating, Slider |
Aggregation field types
Aggregation fields are automatically assigned a field type based on their evaluation data.
- SUM and AVERAGE are either Numbers or Currency.
- COUNT is Number.
- CONCATENATE are Text.
- MIN and MAX match the field type they evaluate. Rating and slider fields are converted to Numbers.
Adding decimal places
You can add decimal places to the aggregation field using the following steps:
- Go to the form, and select an aggregation field.
- In Field properties > Settings.
- Configure the aggregation field based on your requirements.
- In the Number of decimal places field, enter the number of decimal places you want the field to display.
- Publish the form.
Once you publish the form, end-users can create new items, and the aggregation field will display values based on the number of decimal places entered. For example, if you have calculated the average amount of the allocated amount in your budget with the number of decimal places as two, your output is as below:
Aggregating data from other flows
If you uncheck the box that says Aggregate table data in the context of a single item of the process, you can select any flow in your Kissflow account. You can choose another process, project, or dataset. Choose the field and then the type of aggregation.
Filters
You can apply filters to restrict the values used in the aggregation.
Use case
Let’s look at the example of a Time off request.
Let’s say you have a table called Leave Details and ask users to add individual dates they will be gone. These are calculated as a number field called Leave duration. You want to display the sum of all the days requested from the table.
- Create an aggregation field called Total leave days.
- Check the field Aggregate table data in the context of a single item of the process.
- Under Choose a flow to look up, select the table with your leave information, in this instance, Leave Details.
- Under Select a field, select Leave duration.
- Under Aggregation type, choose Sum.
Live forms
Aggregation fields from table fields update automatically when data is entered or edited into the form.
It's important to note that if you use an aggregation field to pull data from other datasets, processes, or projects, the value displayed in the field will remain static after it is initially gathered.