0

I needed a dashboard in Grafana to show two date ranges in panels. I have used interval variable and solve it. Like this:

enter image description here

As seen, one line shows current day and other line shows 10 day before. But we need as a date picker. I know Grafana does not provide date picker in variables. But I want to ask that is it possible to make this using custom or text box variable? I used custom and i gave some dates as string but I couldn't convert it duration while I am querying to Prometheus. My Prometheus query is

MY_METRIC offset $daybefore
madogan
  • 605
  • 7
  • 11

1 Answers1

0

I solved it using JavaScript in text panel. I formatted duration as time with a function.

madogan
  • 605
  • 7
  • 11