# Calculated pen on Easy Chart

**URL:** <https://forum.inductiveautomation.com/t/calculated-pen-on-easy-chart/75762>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [June 30, 2023, 10:02am UTC](https://forum.inductiveautomation.com/t/calculated-pen-on-easy-chart/75762 "2023-06-30T10:02:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjguillenes](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jjguillenes](https://forum.inductiveautomation.com/u/jjguillenes)\
**Post date:** [June 30, 2023, 10:02am UTC](https://forum.inductiveautomation.com/t/calculated-pen-on-easy-chart/75762/1 "2023-06-30T10:02:05Z")

</div>

Hello people, i have what i think its an easy question, is it posible to show a calculated pen that is a simple calculation???, "if tag 1 = 1 and tag 2 = 0 then 1" i know i can do it with an expresion tag but i have over a year of historian of those previous tags and dont know how to create retrospective history (if posible)

thanks in advance

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 30, 2023, 10:04am UTC](https://forum.inductiveautomation.com/t/calculated-pen-on-easy-chart/75762/2 "2023-06-30T10:04:42Z")

</div>

This is not clear.  
Do you want to pick a tag depending on some condition, or pick a value in their historised values for each time point depending on a condition ?

---

<div class="post-metadata">

**Author:** ![jjguillenes](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jjguillenes](https://forum.inductiveautomation.com/u/jjguillenes)\
**Post date:** [June 30, 2023, 11:46am UTC](https://forum.inductiveautomation.com/t/calculated-pen-on-easy-chart/75762/3 "2023-06-30T11:46:21Z")

</div>

let me try again,

i want to show a tag, which is a resultant of 2 tags, in a chart like a clock signal.  
the tag would be 1 if the first tag value is 1 and the second is 0.  
the yellow highlighted zone is the result i want to show in a in single tag

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8ff03139ee0bbaae196dbdcd93d33f7fffe4e609.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 30, 2023, 12:16pm UTC](https://forum.inductiveautomation.com/t/calculated-pen-on-easy-chart/75762/4 "2023-06-30T12:16:18Z")

</div>

So what you want to show is not a tag but a value that's computed based on 2 tags ?

My knowledge of visio is limited but the easy chart might not be the right component for this.  
Use a simple chart, pull the data for your 2 tags with functions, and process the results to get what you want. Something like

```python
data = [int(a - b == 1) for a, b in zip(tag_data_a, tag_data_b)]

```

This will only work properly if both tags have matching data, by which I mean data for the same timestamps or approximately. If you have data for t=1, t=3 and t=6 for a and t=2, t=4 and t=5 for b it might not be reliable.
