Converting pie chart to time series

I created a pie-chart to monitor how many interfaces have what status and it works well.
Now I want to create the same data but over time in a Time Series graph. But I can’t get the data to count measurements in each distinct value to create this graph. I get the errors “no graphable fields” or “data doesn’t have a time field”.

Here is how I created the pie chart, using flux:

from(bucket: "${Bucket}")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] =~ /eth/ and r["_measurement"] =~ /Status/)
  |> filter(fn: (r) => r["host"] == "${Device}")
  |> last(column: "_value")
  |> keep(columns:["_value", "_measurement"])
  |> group(columns: ["_value"])

Any suggestion on what I am missing?

Does your query produce any results in table view? What about the same query in Influx Explorer?