I have some code that uses the names in a column to check the # of rows in another datatable that are above or below an "outlier" threshold (which we want to just use a fixed value for) for that column.
code is below. we typically do this for 30 to 50 columns (so for each row iterates 30 to 50 times). it's currently taking 26 seconds, on a datatable (the one where outliers are being counted_ that only contains a small number (200) of rows. so something seems too slow.
i tried doing with tabulate, and was thinking of summarize - but i need to count above a simple threshold. any suggestions for how to do this more quickly? i need to be able to complete for artbitrary number of columsn, as stored in the "rankdt:Analysis Columns" in the code below.
i tried change "get rows where" to "select where", then counting selected rows - but this made no speed different.
thanks,
jetpeach
for each row( // for each row in rankdt - 30 to 50 rows
col_to_count = char(rankdt:Analysis Columns);
rowsAbove= jdt<<GET rows="" where=""> outlier_flag_threshold);
:Above flag =N rows(rowsAbove);
rowsBelow= jdt<<GET rows="" where=""></GET></GET>
Appears like a situation where either matrix calculations or use of the ColStat functions could speed things up.
It's not clear to me how your tables and tresholds are organized. Could you share
example tables?