Graph not displaying correctly when using quantile function


I’m not able to get the graph to display correctly when I apply a quantile function in my query.

My query:

aeInBps = from(bucket: "bb_interfaces_test")
  |> range(start: -10m)
  |> filter(fn: (r) => r._measurement == "interfaces" and (r._field == "in-octets"))
  |> filter(fn: (r) => r.device =~ /chgo/)
  |> drop(columns:["path", "system_id"])
  |> group(columns: ["interface-name", "device"])
  |> aggregateWindow(every: 1m, fn: last)
  |> derivative(unit: 1m, nonNegative: true, columns: ["_value"])
  |> map(fn: (r) => ({ r with _value: float(v:r._value) / 60.0 * 8.0 }))
  // |> yield()
  |> quantile(q: .99, method: "exact_selector")
  |> yield()

If I remove the last 3 lines from the query (basically taking out the quantile part) then the graph prints out correctly.

Good output:

Bad output:

Thank you.

Hello @mohsin106,
Can you please try using the estimate_tdigest method instead? I believe you want the values that fall within the quantile? Not the value of the quantile?

When using the estimate_tdigest or exact_mean methods, it outputs non-null records with values that fall within the specified quantile.

When using the exact_selector method, it outputs the non-null record with the value that represents the specified quantile.