# Daily Totals in time series charts

**URL:** <https://forum.inductiveautomation.com/t/daily-totals-in-time-series-charts/25988>\
**Category:** Ignition\
**Created:** [June 20, 2019, 4:36pm UTC](https://forum.inductiveautomation.com/t/daily-totals-in-time-series-charts/25988 "2019-06-20T16:36:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [June 20, 2019, 4:36pm UTC](https://forum.inductiveautomation.com/t/daily-totals-in-time-series-charts/25988/1 "2019-06-20T16:36:32Z")

</div>

I have not been able get a time series or xy report to ever work if I do any formatting with the date…I end up using a bar chart but that is not always the best way to display the data…I put some time and effort in today to try and get it to work, but I always end of with all of the data plotted in the center of the chart with the 1970 epoch date. Here is an example query…

SELECT CAST([datefield]) as DATE, COUNT(somefield])  
FROM someTbl  
WHERE daterange  
GROUP BY CAST([datefield]) as DATE

The date returned looks like “05/21/2019” I always get what looks like good data, and like I said, the bar chart always works properly

Any thoughts? I would think if it did not like the date format that an XY chart would work, but it produces the same result!

Thanks

---

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [June 20, 2019, 4:52pm UTC](https://forum.inductiveautomation.com/t/daily-totals-in-time-series-charts/25988/2 "2019-06-20T16:52:20Z")

</div>

I fixed it by CASTing the date back to datetime after the totaling, but still curious if there is any way to format the date? Maybe using scripting? A lot of my reports would be more readable if the date was formatted with just month/day like “06/19”

---

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [June 20, 2019, 6:44pm UTC](https://forum.inductiveautomation.com/t/daily-totals-in-time-series-charts/25988/3 "2019-06-20T18:44:44Z")

</div>

Doh! Never mind, I was trying to format the date in the query when it is much easier to do it in the date format of the chart!!!

---

<div class="post-metadata">

**Author:** ![akshayrpimple](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@akshayrpimple](https://forum.inductiveautomation.com/u/akshayrpimple)\
**Post date:** [March 7, 2021, 3:12pm UTC](https://forum.inductiveautomation.com/t/daily-totals-in-time-series-charts/25988/4 "2021-03-07T15:12:08Z")

</div>

Hi @leversole, need your little help on this issue. I have a query SELECT SUM(ABC), MAX(t\_stamp) FROM XYZ WHERE AJSFBF \> SJSD GROUP BY t\_stamp . Now when I want to add range key in the it just shows me my query name.\_ which doesn’t allow to add pens for the individual selected columns on the timeseries chart in the reporting section. Can you please help me with that?
