Subtract values from different measurements

I want to subtract one value from another from different measurements. Boths values are floats. I am following the article here: https://www.influxdata.com/blog/influxdb-how-to-do-joins-math-across-measurements/
I am a noob at fluxql which i use for graphing some metrics from my heatpump.

the query i use is:

returnFlow = from(bucket: “Nibe”)
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) => r._measurement == “40047” )
|> drop(columns:[“_start”, “_stop”, “_measurement”, “_field”, “category id”, “designation”, “system id”, “system unit id”, “title”, “unit”])

flow = from(bucket: “Nibe”)
|> range(start: v.timeRangeStart, stop:v.timeRangeStop)
|> filter(fn: (r) => r._measurement == “40048” )
|> drop(columns:[“_start”, “_stop”, “_measurement”, “_field”, “category id”, “designation”, “system id”, “system unit id”, “title”, “unit”])

deltaT = join(tables:{returnFlow:returnFlow, flow:flow}, on:[“_time”])

I have tried to “copy” from the article and updated for my use case. But i cannot get it to work, i always get the error " ```
error in query specification while starting program: this Flux script returns no streaming data. Consider adding a “yield” or invoking streaming functions directly, without performing an assignment


It seems so simple but ended up as a blocker for me