# Bar Chart to show cumulative data, day by day

**URL:** <https://forum.inductiveautomation.com/t/bar-chart-to-show-cumulative-data-day-by-day/57618>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [March 24, 2022, 8:43pm UTC](https://forum.inductiveautomation.com/t/bar-chart-to-show-cumulative-data-day-by-day/57618 "2022-03-24T20:43:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rigoberto.reyes](https://avatars.discourse-cdn.com/v4/letter/r/65b543/32.png) [@rigoberto.reyes](https://forum.inductiveautomation.com/u/rigoberto.reyes)\
**Post date:** [March 24, 2022, 8:43pm UTC](https://forum.inductiveautomation.com/t/bar-chart-to-show-cumulative-data-day-by-day/57618/1 "2022-03-24T20:43:50Z")

</div>

Hi there.

I want to show the amount of records of a SQL table (day by day) in a bar chart, using next script:

**SET STATISTICS TIME, IO ON;**  
**SELECT COUNT(\*) , CAST([ShiftStartTS] AS date) FROM**  
**MyTable**  
**WHERE shiftstartts BETWEEN DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0) AND DATEADD(month, DATEDIFF(month, 0, GETDATE())+1, 0)**  
**GROUP BY CAST([ShiftStartTS] AS date)**  
**ORDER BY 2 ASC**

However, it does not work. If I use a power table, it works like this:

 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/b/fb29a8941a7e8e65f663adb5791c4677d4371ea2.png)

Is there a way to set Bar Chart object to show that information?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 24, 2022, 8:54pm UTC](https://forum.inductiveautomation.com/t/bar-chart-to-show-cumulative-data-day-by-day/57618/2 "2022-03-24T20:54:08Z")

</div>

The date should probably be the first column.

---

<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:** [March 25, 2022, 9:42am UTC](https://forum.inductiveautomation.com/t/bar-chart-to-show-cumulative-data-day-by-day/57618/3 "2022-03-25T09:42:53Z")

</div>

@Rigoberto, a tip: use the `</>` code formatting button to format code - not bold type.
