Count rows where a column is greater than zero
Count rows where a column is greater than zero
Hi!
Currently using
var rowCount = api.column(0).data().length;
Im wondering how I can count the rows which have a value in a column that is greater than zero?
This discussion has been closed.
            
Answers
You can try
filterthen get the length of the returned array.Kevin
Use
count()rather than.lengthto get the number of elements in a DataTables API instance..lengthwill work sometimes, but at other times it won't since a 2D structure can be used to represent different tables.Allan