Getting number of rows with filter

I want to get the number of rows where status is 'Processing', I need Urgent help. The value should be displayed in a text component

image

I see two easish ways of doing this.

The first is to use an aggregate function in a second query (assuming you are using a query of course)

select count(status)
from myTable
where status = 'Processing'
group by status

Or you could create a transformer to count the table's source (not tested, just pulled off of ChatGPT)

const arr = {{myTable.data}}
return arr.filter(function(obj) {
    return obj.status === 'processing';
}).length
1 Like