# Gantt Chart Issue

**URL:** <https://forum.inductiveautomation.com/t/gantt-chart-issue/1558>\
**Category:** Archived Topics\
**Created:** [February 19, 2010, 10:29pm UTC](https://forum.inductiveautomation.com/t/gantt-chart-issue/1558 "2010-02-19T22:29:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [February 19, 2010, 10:29pm UTC](https://forum.inductiveautomation.com/t/gantt-chart-issue/1558/1 "2010-02-19T22:29:42Z")

</div>

I am trying to create Gantt Chart with the following data set

```auto
Program StartDate EndDate Percent
800B Tank CIP	2010-02-12 16:01:12.597	2010-02-12 16:03:42.587 100
900 Tank CIP	2010-02-12 21:04:12.597	2010-02-15 08:03:02.080 100
900 Tank CIP	2010-02-15 10:10:02.057	2010-02-15 15:24:02.063 100
800 Tank CIP	2010-02-15 16:51:02.073	2010-02-15 22:05:32.070 100
800B Tank CIP	2010-02-15 22:22:32.060	2010-02-16 08:21:32.070 100
800D Tank CIP	2010-02-16 10:20:32.060	2010-02-16 15:45:32.077 100
800D Tank CIP	2010-02-16 15:58:32.077	2010-02-16 16:00:32.077 100
800 Tank CIP	2010-02-16 17:19:02.083	2010-02-16 22:10:32.060 100
800 Tank CIP	2010-02-16 22:21:02.060	2010-02-17 07:19:32.083 100
800D Tank CIP	2010-02-17 07:22:02.083	2010-02-17 07:22:02.083 100
800B Tank CIP	2010-02-17 11:14:32.067	2010-02-17 16:17:32.063 100
900 Tank CIP	2010-02-17 16:37:32.083	2010-02-17 21:35:32.083 100
800D Tank CIP	2010-02-17 21:43:32.087	2010-02-18 07:36:34.720 100
800D Tank CIP	2010-02-18 10:16:04.727	2010-02-18 10:18:34.720 100
```

but the chart will not show the task at the second time. I would upload a picture of the chart, but I keep getting this error.

Could not upload attachment to ./files/3515\_89efcf789b8a31316583acb0ccecf8f5.

---

<div class="post-metadata">

**Author:** ![MickeyBob](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@MickeyBob](https://forum.inductiveautomation.com/u/MickeyBob)\
**Post date:** [February 20, 2010, 4:28am UTC](https://forum.inductiveautomation.com/t/gantt-chart-issue/1558/2 "2010-02-20T04:28:12Z")

</div>

Try altering your query so that the tasks have unique identifiers.

For example, the following would work for MS SQL Server 2005 or later:

`SELECT Program + ' [' + CAST(ROW_NUMBER() OVER (ORDER BY EndDate) AS varchar(2)) + ']',
       StartDate,
       EndDate,
       [Percent]
FROM GanttChartData
ORDER BY EndDate`or

`SELECT Program + ' [' + CAST(ROW_NUMBER() OVER (PARTITION BY Program ORDER BY EndDate) AS varchar(2)) + ']',
       StartDate,
       EndDate,
       [Percent]
FROM GanttChartData
ORDER BY EndDate`

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [February 22, 2010, 4:29pm UTC](https://forum.inductiveautomation.com/t/gantt-chart-issue/1558/3 "2010-02-22T16:29:14Z")

</div>

The problem with that is my chart will have 14 rows in it. One for each unique program name. Then when someone tries to look a week or more the chart could have 100s of rows in it.

I decided to go with a status chart instead.

Thanks for the reply.
