How to debug join node in Kapacitor?

I also asked this on StackOverflow, but had no response there.

I have API that counts requests to it from different devices (platforms) and affiliates. Now, requests are stored in influxdb as integer counter.

I want to display table in grafana that shows percent of requests for each affiliate by platform from last hour. So, I compute the sum of requests over last hour per platform, sums per platform per affiliate, and now want to join that results back, to divide affiliate sums by total sums. But join node does not process any values, as shown by dot graph and by http queries to Kapacitor http://localhost:9092/kapacitor/v1/tasks/totaler/joinedData

dbrp "telegraf"."autogen"

// TODO change to 1h or something

var metrics = stream
        .where(lambda: "url" == 'http://randometric:8888/metrics-app')

var totalByPlatform = metrics

var totalByAffiliate = metrics

        .as('total', 'affiliates')
    |eval(lambda: "affiliates.Received" / "total.Received" * 100.0)