Choose Language Hide Translation Bar
0 Kudos

Summerize/Summary aggregation function for character data. Concat Charcter Vector into a Scalar (by)

Generalize the code to work with Summerize/Summary.

 

dt = current data table();

Summarize( g = By(:Column 0, :Column 1 ) );

For( i = 1, i <= N Items( g[1] ), i++,

   r = dt << Get Rows Where( dt:Column 0 == g[1][i] & dt:Column 1 == g[2][i]);

   dt:Column 3[r] = Concat Items( dt:Column 2[r], "_" );

);

nt = dt << Summary( Group( :Column 0, :Column 1, :Column 3 ) );

Tracking Number: 7612662586

Defect ID: