Lookup fields in post-aggregator

Hi guys,

Is there any possibility to use lookuped fields in post-aggregations?

I tried the next json and it says the the lookup field (campaignName) is not available in post-aggregator function.

I think that lookup is done after post-aggregation. That’s why it happens.

Any idea or way to make that work?

“queryType”: “groupBy”,
“dataSource”: “myDS”,
“granularity”: “hour”,
“dimensions”: [“client”,
“replaceMissingValueWith”:“bad value”,
“aggregations”: [
{“type” : “longSum”, “name” : “count”, “fieldName” : “count”}
“postAggregations” : [{
“type” : “javascript”,
“name” : “myCustom”,
“fieldNames” : [“count”, “campaignName”],
“function” : “function(count, campaignName) { if(campaignName == ‘abc’) {return 100} else {return 200}}”

“intervals”: [“2011-06-27/2019-06-28”]