I'm trying to create a script that can loop through each cell of each column to count the number of cells that are less or greater than a specified value.
If i have a table of columns A ~ D and Rows 1 ~ 10, I'd like to count the values of the cells row-wise and column-wise. In other word, for all rows of column A, how many meet my criteria. And similarly for all columns of Row 1, how many meet my criteria. I would then do this for all rows and columns.
Here's what ive tried to start with, but it returns nothing. Any ideas on this or a more effcient way to do it?
Names Default To Here( 1 );
dt = Current Data Table();
Clear Log();
// Get all of the numeric columns in the data table
Numeric Columns = dt << get column names( numeric, string );
NRows = N Rows( dt );
Count = {};
//Column loop
For( i = 1, N Items( Numeric Columns ) <= 1, i++,
For Each Row(
dt,
If( Column(dt, Numeric Columns[i]) < 101,
Count = Count++;
Show( Count );
)
)
);