# easyChart - compare the same tag with a time shift

**URL:** <https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883>\
**Category:** Ignition\
**Created:** [April 5, 2019, 8:54pm UTC](https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883 "2019-04-05T20:54:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 5, 2019, 8:54pm UTC](https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883/1 "2019-04-05T20:54:05Z")

</div>

We need to compare with easychart the history of the same tag value with a time shift. For example the temperature chart for week N and week N-1 on the same chart.  
A calculed pen History with operation like plus/minus delta time would be cool.

Is there a way to achieve this feature with Ignition 7.9.X or 8.0 ?

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [April 6, 2019, 11:48am UTC](https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883/2 "2019-04-06T11:48:07Z")

</div>

We did this using a second chart over-layed on the first with a transparent background.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [April 6, 2019, 1:29pm UTC](https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883/3 "2019-04-06T13:29:43Z")

</div>

Thanks for this workaround in the meantime. A new calculated pen would be more suitable for this need.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 6, 2019, 3:45pm UTC](https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883/4 "2019-04-06T15:45:13Z")

</div>

Hmmm. Sounds like a feature I could add to NoteChart. The key is to adjust the query parameters for the pen so there’s data to shift into the target time span.

---

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [April 6, 2019, 7:51pm UTC](https://forum.inductiveautomation.com/t/easychart-compare-the-same-tag-with-a-time-shift/23883/5 "2019-04-06T19:51:16Z")

</div>

Aside from an overlay, a view in the database would give you that, since easychart can also access views.

```auto
SELECT t_stamp, value as 'now', null as 'lastweek'
UNION ALL
SELECT DATEADD(week,1,t_stamp), null as 'now', value as 'lastweek' )

```

I used views often for easychart, since there’s no way to directly manipulate data.
