How do I filter two different values in two columns?
How do I filter two different values in two columns?
Hi Alan,
before I ask my question, let me say this - I really appreciate datatables and its clean API. Thank you for the effort you put into this js-miracle!
Usually I find all my answers in the forum and stackoverflow, but this one I couldn't solve. I have a table like this:
I would like to count the rows where I have a certain provider in Periode "1", e.g. all "nic.at" where in the same time the 2nd value ='1'. Can you give me a hint as how can I achieve this? I can filter/count one or the other, but not both in the same time.
Thank you a lot!
Christian
This question has an accepted answers - jump to answer
Answers
Hi @hulkie74 ,
Thank you for the kind words.
This will do the trick - you need to scan alongside the
filter()
. I used a separate variable,col2
for performance.Cheers,
Colin
Hi Colin,
THANK YOU very much for your quick and genius response!
Cheers,
christian