Unable to create filters using mongoDb native query

I have created mongo native query using lookups , group by, cond. I want to make filter with respect to the same query. But unable to create them. So that i can filter the records on the basis of filter selection.

Brief snippet of my code is below.
{
"$group": {
"_id": {
"housingStatus": "$housingStatus",
},
"count": {
"$sum": { $cond: [{$and:[{"$eq": ["$conditions._id", {{disease_id}} ]} ]}, 1, 0 ] }
},
"names": {
"$addToSet": "$housingName.type"
}
}
}
i want to make disease id dynamic on the basis of filter.

I choose Field filter and in filter widgets i choose Id.
Please assist me in finding out why my filters are not working using the Field Filter.

Please post diagnostic info. By the way, what do you see in the UI when you write that query?