Few more.
Names Default To Here(1);
dt = New Table("table",
Add Rows(3),
New Column("A", Numeric, "Continuous", Format("Best", 12), Set Values([0, 1, 0])),
New Column("B", Numeric, "Continuous", Format("Best", 12), Set Values([0, 0, 0])),
New Column("C", Numeric, "Continuous", Format("Best", 12), Set Values([1, 0, -1])),
New Column("D", Numeric, "Continuous", Format("Best", 12), Set Values([0, 0, .]))
);
// If you have columns with missing values (:D in this case) it might yield weird results
// you might have to use IfMZ instead of If or in some cases use different calculations
// depending on how you want to see missing values (as zero or "normal" value)
For Each({col}, {:A, :B, :C, :D},
Show(col);
Print("min-max");
If(Col Max(col) == Col Min(col) & Col Max(col) == 0,
Print("Col is all zero")
, // else
Print("Col is non-zero")
);
Print("all");
If(All(col << get as matrix == 0),
Print("Col is all zero")
, // else
Print("Col is non-zero")
);
Print("any");
If(Any(col << get as matrix),
Print("Col is non-zero")
, // else
Print("Col is all zero")
);
Write("\!N");
);
This might be out of scope but different methods might handle missing values differently and if you happen to have column properties set (missing value codes for example), those might also have an effect on the results and you might have to use Col Stored Value(<dt>, col, <row>)
-Jarmo