Need help in choosing multiple filters

Hi All,

I am trying to find the subset of Songs with multiple selected column values (Raag, Parjay, and Taal). The select results is only picking up the first choice. Any help will be appreciated.

Perhaps you need to combine your multiple arrays of data into a single array. Here is one way:

Inputs.table([...selectedR, ...selectedP, ...selectedT])

Thanks so much, Mike! However, your suggested code chooses ‘or.’ I want the ‘and’ function.
Here is the main notebook that I am working on: a dataset of the entire corpus of Tagore’s songs:

To give a concrete example, I want to choose all the songs that are in the category/Parjay ‘Puja’, Raag: ‘Bhairavi’, and 'Taal/rhythm: ‘Dadra.’

Thanks in advance.


Ah, I misunderstood. Something like this?

Inputs.table(tA.filter((d) => d.Parjay === parjay && d.Raag === raag && d.Taal === taal))

You could also use here if you want something more flexible.

viewof selected =, {query: "Puja Bhairavi Dadra"})

1 Like

Thanks so much, Mike; and of course, thanks for d3.js!


1 Like