Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"aggregations": [
{
"fieldName": "metric_with_total_count_of_events",
"name": "total",
"type": "longSum"
},
{
"name": "rolledup",
"type": "count"
}
],
"dataSource": "your_datasource",
"dimensions": [
],
"granularity": "DAY",
"having": null,
"intervals": "2017-11-16:00:00+00:00/2017-11-17T00:00:00+00:00",
"queryType": "groupBy",
"postAggregations": [
{
"fields": [
{
"fields": [
{
"fieldName": "rolledup",
"type": "fieldAccess"
},
{
"fieldName": "total",
"type": "fieldAccess"
}
],
"fn": "/",
"type": "arithmetic"
},
{
"type": "constant",
"value": 100
}
],
"fn": "*",
"name": "rollup_perc",
"type": "arithmetic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment