Count rows where a column is greater than zero
Count rows where a column is greater than zero
Tronik
Posts: 122Questions: 28Answers: 1
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
filter
then get the length of the returned array.Kevin
Use
count()
rather than.length
to get the number of elements in a DataTables API instance..length
will work sometimes, but at other times it won't since a 2D structure can be used to represent different tables.Allan