Show each months sum for the last n months

  • What Grafana version and what operating system are you using?

    • 12.3.3
  • What are you trying to achieve?

    • Change the time range for one panel to the last 12 full months. If today is 18. February 2026, I want the following labels on the x-axis: 2025-02 - 2026-02.
  • How are you trying to achieve it?

    • I’ve tried several different approaches, including Relative time, Time shift and PromQL aggregation methods on the Panel. In many cases all I got was No data.
    • I tested if the data was still there when changing the dashboard’s time range but got similar results.
    • I’ve also tested the same thing with InfluxDB, which worked just fine. We would like to use Mimir though.
  • What happened?

  • What did you expect to happen?

    • I was expecting to see today’s and yesterday’s data when selecting Last 6 months as it is the case when selecting Last 7 days.
    • Can someone please explain how to use Relative time and Time shift?
  • Did you follow any online instructions? If so, what is the URL?

    • I could not find any proper explanation of how to use Relative time and Time shift.