How do I get grouped by field value in series name in Grafana

I managed to get my query working - I am dividing the idle CPU percentage by the number of CPUs. However, in Grafana where I am plotting the results as a time based Graph, I do not seem to get the value of the grouped by column (_cpu) as the series name. How do I transform my result set into something that will output the grouped by column value in such a way that grafana will pick it up as the name of the series?

a = from(bucket: "telegraf/autogen")  
  |> range($range)
  |> filter(fn: (r) => r._measurement == "system" and (r._field == "n_cpus" and r.host =~ /^$source$/))
  |> window(every: $__interval)
  |> mean()
  |> duplicate(column: "_stop", as: "_time")

b = from(bucket: "telegraf/autogen")
  |> range($range)
  |> filter(fn: (r) => r._measurement == "cpu" and (r._field == "usage_idle" and r.host =~ /^$source$/ and r.cpu != "cpu-total" ))
  |> window(every: $__interval) 
  |> mean()
  |> duplicate(column: "_stop", as: "_time")
  
join(tables: {a:a, b:b}, on: ["_time", "_stop", "_start", "host"])
  |> map(fn:(r) => ({
    _time: r._time,
    _cpu: r.cpu,
    _value: (100.0 - r._value_b) / float(v: r._value_a)
  }))    
  |> group(columns: ["_cpu"])

I do see the name of the _cpu field in the raw output data:

#datatype,string,long,string,dateTime:RFC3339,double
#group,false,false,true,false,false
#default,_result,,,,
,result,table,_cpu,_time,_value
,,0,cpu0,2019-09-09T21:32:20Z,0.5744255732288899
,,0,cpu0,2019-09-09T21:32:30Z,0.8258258259937996
,,0,cpu0,2019-09-09T21:32:40Z,1.0468594216190752
...

In Grafana I do not see the value of _cpu in the series name:

It seems if you leave me long enough I figure it out. Letting me wait 23 minutes to figure this out on my own is totally unacceptable for an open source project like this - I expected more for my money and time :wink:. Here is how I fixed the series name (from above):

join(tables: {a:a, b:b}, on: ["_time", "_stop", "_start", "host"])
  |> map(fn:(r) => ({
    _time: r._time,
    _cpu: r.cpu,
    _field: r.cpu,
    _value: (100.0 - r._value_b) / float(v: r._value_a)
  }))    
  |> group(columns: ["_cpu"])