# Is there a way to use the date picker to represent a historical data value?

**URL:** <https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 22, 2022, 1:51pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410 "2022-02-22T13:51:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicole\_Weiss](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@Nicole\_Weiss](https://forum.inductiveautomation.com/u/Nicole_Weiss)\
**Post date:** [February 22, 2022, 1:51pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/1 "2022-02-22T13:51:07Z")

</div>

I have a sum total data value in a table, but I want to find the sum between certain dates and have it represented. Is this possible?

Thank you.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 22, 2022, 1:59pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/2 "2022-02-22T13:59:00Z")

</div>

A date picker can only represent a date. It can’t represent a historical data value.

You need to explain how you are accessing the data to populate the table.

- Are you using a named query?
- Are you binding the table to the query?

Can you give an example of how the data table is structured and how you want to select and return the data.

---

<div class="post-metadata">

**Author:** ![Nicole\_Weiss](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@Nicole\_Weiss](https://forum.inductiveautomation.com/u/Nicole_Weiss)\
**Post date:** [February 22, 2022, 2:09pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/3 "2022-02-22T14:09:34Z")

</div>

For the data in the table, I bound it to a tag in the tag history tab. Then have a calculation to total the sum of all the values in that tag. I do have a grand total, but I want to find the sum of between certain dates. I may have worded it wrong. I’m still very new to Ignition.

![Screenshot (22)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e994449288cf4b713c5eb66b86616314b2fb6693.png)

Not sure if the screenshot helps!

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [February 22, 2022, 2:56pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/4 "2022-02-22T14:56:03Z")

</div>

Do you mean a date range? between Thursday and Saturday sort of thing?

---

<div class="post-metadata">

**Author:** ![Nicole\_Weiss](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@Nicole\_Weiss](https://forum.inductiveautomation.com/u/Nicole_Weiss)\
**Post date:** [February 22, 2022, 3:02pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/5 "2022-02-22T15:02:13Z")

</div>

Yes! For example, I want the total volume from June, 2, 2020- June, 2, 2021.

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [February 22, 2022, 3:06pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/6 "2022-02-22T15:06:51Z")

</div>

Ok, it’s simple to use two date pickers, one for start dateteime and one for the end datetime.  
use these two datetimes to get the data. you can script to use the same date picker twice but it’s not trivial.

---

<div class="post-metadata">

**Author:** ![Nicole\_Weiss](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@Nicole\_Weiss](https://forum.inductiveautomation.com/u/Nicole_Weiss)\
**Post date:** [February 22, 2022, 3:13pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/7 "2022-02-22T15:13:33Z")

</div>

How do you exactly do that? I just know the basics about Ignition/perspective, so any help/tips would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [February 22, 2022, 3:27pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/8 "2022-02-22T15:27:43Z")

</div>

> [@Nicole\_Weiss](#):
>
> How do you exactly do that?

That depends heavily on your project design.

However, basically, your going to add two Date pickers to your view, and use the value prop to get the date that was selected by the user.

I would suggest utilizing a separate button to trigger your query so the user can select the range they want and then trigger the query, as opposed to triggering on a change event.

How to do it is a rather broad question to answer.

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [February 22, 2022, 3:31pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/9 "2022-02-22T15:31:05Z")

</div>

Assuming you are using Tag History  
Use a tag history binding and select the time Range for “History” and populate the Start Date and End Date with the values of the date pickers, which should bring back some data to play with.

---

<div class="post-metadata">

**Author:** ![Nicole\_Weiss](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@Nicole\_Weiss](https://forum.inductiveautomation.com/u/Nicole_Weiss)\
**Post date:** [February 22, 2022, 6:14pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-use-the-date-picker-to-represent-a-historical-data-value/56410/10 "2022-02-22T18:14:10Z")

</div>

I just needed a general direction to go in and then maybe from there I could figure it out.  
Thank you for your suggestion!
