Generate new column (string) with compose of the same ID in different rows and excluded duplicate stringHi,
I want to generate a new column that combines the strings in the same ID in different rows as the example table (I want column results). Thank you
ID | Ab | results |
1 | A2, B3 | A2, B3, B56, C7, DR5 |
1 | A2, B56, C7, DR5 | A2, B3, B56, C7, DR5 |
1 | DR5 | A2, B3, B56, C7, DR5 |
2 | A56, B9, C0, DQ89 | A56, B9, C0, DQ89 |
2 | | A56, B9, C0, DQ89 |
2 | DQ89 | A56, B9, C0, DQ89 |
3 | A2 | A2, DR5 |
3 | DR5 | A2, DR5 |
| 3 | | A2, DR5 |
Basic Data Analysis and ModelingRe: Generate new column (string) with compose of the same ID in different rows and excluded duplicate stringHere is the formula I worked out. Others may have better ways
curID = :ID;
theRows = Current Data Table() << get rows where( :ID == curID );
theArray = Associative Array( Words( Concat Items( :Ab[theRows] ), ", " ) );
Concat Items( theArray << get keys );

Re: Generate new column (string) with compose of the same ID in different rows and excluded duplicate stringHere is an approach via Tables/Summary:
:folded_hands: Summary and Tabulate: add aggregation option for Character columns