How to query lessThan or moreThan with metricSpec


Is there anyway I can query value using lessThan or moreThan in metricSpec like this. I would like to select anything with _v lessThan 0.

I tried something like this

“queryType”: “groupBy”,
“context”: {
“timeout”: 20000
“dataSource”: “firehose-web”,
“dimensions”: ["_v"],
“granularity”: “all”,
“filter”: {
“type”: “and”,
“fields”: [{
“type”: “selector”,
“dimension”: “_o”,
“value”: “origin”
}, {
“type”: “selector”,
“dimension”: “_t”,
“value”: “timespent”
“aggregations”: [{
“having”: {
“type”: “greaterThan”,
“aggregation”: “_v”,
“value”: 0
“intervals”: [“2016-03-28T00:00:00.000/2016-03-29T00:00:00.000”]


But I get empty result which I know that there must be results.

            "type" : "doubleSum",
            "name" : "valueSum",
            "fieldName" : "_v"
          }, {
            "type" : "doubleMin",
            "name" : "valueMin",
            "fieldName" : "_v"
          }, {
            "type" : "doubleMax",
            "name" : "valueMax",
            "fieldName" : "_v"

Hi Noppanit,

Since “_v” is a dimension, I think you could also express “_v” < 0 as an alphanumeric BoundFilter on _v, together with the filters on “_o” and “_t”.

Can you check if your query returns results when using the BoundFilter?