I suggest using For Each, Filter Each and Transform Each over for loop most of the time as they are faster and easier to read. But they can be more annoying to debug and deal with due to their speed if there is an issue AND they do have one nasty bug/feature". Luckily that bug/"feature" isn't present in simple case such as this(Issue with Function() default local and Each functions ). I'm not sure if you wanted to consider missing values as "valid" values so I did leave Remove From commented out inside the Filter Each loop
Names Default To Here(1);
dt = Current Data Table();
collist = dt << Get Column Names("String");
valid_cols = Filter Each({colname}, collist,
Summarize(dt, vals = By(Eval(colname)));
//Remove From(vals, Contains(vals, "")); // drop missing values if necessary
N Items(vals) > 1;
);
dt_summary = dt << Summary(
Group(valid_cols),
Freq("None"),
Weight("None"),
//Link to original data table(0),
Output Table("Non-Unique Summary")
);
Here is script to create simple demo table
dt = New Table("demo",
Compress File When Saved(1),
New Column("Column 1", Character, "Nominal", Set Values({"a", "a", "a", "a"})),
New Column("Column 2", Character, "Nominal", Set Values({"b", "b", "b", ""})),
New Column("Column 3", Character, "Nominal", Set Values({"", "", "", ""})),
New Column("Column 4", Character, "Nominal", Set Values({"c", "d", "", ""})),
New Column("Column 5", Character, "Nominal", Set Values({"c", "d", "e", "f"}))
);
That add-in was created before JMP had Columns manager and I still prefer it over Columns Manager most of the time. I assume they do have different use cases and Columns Manager tries to replace Columns Viewer platform with some nice extra features and Analyse Columns got its inspiration from pandas profiling (seems to be renamed to ydata profiling) as I had to be able to quickly check how my data looked like in terms of summary statistics.
-Jarmo