User Tools

Site Tools


transformations:enumerategroups

ENUMERATE GROUPS

Category: Transform / Advanced


Description

This action generates group numbers in a new column.

A "group" is defined by unique values in a column or unique combinations of values across multiple columns.


Use cases

This action can be used to create group ID numbers for later reference, lookups, or merges.


Action settings

SettingDescription
ColumnSelect the column or columns to base the group numbers on.


Remarks

Groups are enumerated starting from 1.

The new column containing the group numbers will be named "GroupNo" and appear as the leftmost column, by default.

When multiple columns are selected, the unique combinations of values across the selected columns constitute the "groups".


Examples

Example #1

Enumerate groups based on the values in the "Province" column.

Before (source table)

Province Amount Total Tax
ON 1000 125
ON 1500 187.5
QC 2000 270

After (result table)

GroupNo Province Amount Total Tax
1 ON 1000 125
1 ON 1500 187.5
2 QC 2000 270

Action parameters:

Column: Province


Example 2

Generate group numbers from the values in the selected columns.

Before (source table)

FirstName Middle Init LastName
Mary K Jones
Sam A Walker
Mary M Doe
Reggie B Monroe
Sam D Walker
Mary K Doe

After (result table)

GroupNo FirstName Middle Init LastName
1Mary K Jones
1Mary M Doe
1Sam A Walker
2Sam D Walker
2Mary M Doe
1Reggie B Monroe

Action parameters

Columns: FirstName, LastName


Community examples


See also

transformations/enumerategroups.txt · Last modified: 2025/01/12 17:58 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki