# Compare data on the same Panel for two time Range

**URL:** <https://community.grafana.com/t/compare-data-on-the-same-panel-for-two-time-range/81574>\
**Category:** InfluxDB\
**Tags:** flux, influxdb, query-help, bar-chart\
**Created:** [February 13, 2023, 7:05am UTC](https://community.grafana.com/t/compare-data-on-the-same-panel-for-two-time-range/81574 "2023-02-13T07:05:48Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![grant2](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/grant2/32/42281_2.png) [@grant2](https://community.grafana.com/u/grant2)\
**Post date:** [February 17, 2023, 5:07pm UTC](https://community.grafana.com/t/compare-data-on-the-same-panel-for-two-time-range/81574/5 "2023-02-17T17:07:27Z")

</div>

Hi @goodold

OK, this is not a perfect solution, but will hopefully get you started…

In the graph below, I am plotting daily energy usage from 01-Dec to 31-Jan:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/2/c/2c9ea676ebde58a6903214de4c51dcb247975eaf.png)

Adding these two statements will give you the month-over-month view. More [here](https://docs.influxdata.com/flux/v0.x/stdlib/experimental/aligntime/).

```auto
  |> window(every: 1mo)
  |> experimental.alignTime(alignTo: 2021-12-01T00:00:00Z)

```

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/6/e/6ebd54935f97ae5c30ebef01f78938e36caf2eaa.png)

You will notice that the start of the graph begins with 30-Nov and for some reason does not have two series displayed for the 30th & 31st. Maybe @ldrascic or @yosiasz can tell me / us why.

---

_[View the full topic](https://community.grafana.com/t/compare-data-on-the-same-panel-for-two-time-range/81574)._
