I'm not sure how fast it would be, but you could use Associative Array to get rid of all the duplicates. This isn't the cleanest solution but it might work
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(3),
Compress File When Saved(1),
New Column("Column 1", Character, "Nominal", Set Values({"A", "B", "C", ""})),
New Column("Column 2", Character, "Nominal", Set Values({"A", "", "", ""})),
New Column("Column 3", Character, "Nominal", Set Values({"A", "", "C", ""}))
);
dt << New Column("Col", Character, Nominal, Formula(
aa = Associative Array(Eval List({:Column 1, :Column 2, :Column 3}));
(aa << get keys)[N Items(aa)];
));
Other option which should work fairly nicely is to find first value which isn't missing and then use that (build a list, use loc to find non-missing index, if one is found use it to get value from list and if not set it as missing)
dt << New Column("Col2", Character, Nominal, Formula(
l = Eval List({:Column 1, :Column 2, :Column 3});
ok_idx = Loc(!Matrix(IsMissing(l)));
If(N Items(ok_idx) > 0,
l[ok_idx][1];
,
""
)
));
You can also Concatenate With Space
And then create other column which is First Word
Similar thing can be done with Cols/Utilities/Combine Columns and First Word column formula
-Jarmo