# Time series chart - ghost data

**URL:** <https://forum.inductiveautomation.com/t/time-series-chart-ghost-data/111125>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 1, 2025, 10:45am UTC](https://forum.inductiveautomation.com/t/time-series-chart-ghost-data/111125 "2025-10-01T10:45:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafal\_Samoraj](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@Rafal\_Samoraj](https://forum.inductiveautomation.com/u/Rafal_Samoraj)\
**Post date:** [October 1, 2025, 10:45am UTC](https://forum.inductiveautomation.com/t/time-series-chart-ghost-data/111125/1 "2025-10-01T10:45:58Z")

</div>

Hi,  
My problem is that time series chart shows data/bars which doesn`t exists.

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

You can see that this record doesn`t exits in Dataset Editor.

Data comes from Named query:

```sql
SELECT
SUM(meterReading) AS usage,
DATEADD(MINUTE, DATEDIFF(MINUTE, 0, readingDate), 0) AS readingNoSec
INTO
#grouped
FROM
[PLGROmaintenanceSystem].[dbo].[BMS_energyMeters]
WHERE
meterName IN ('RGnN1_AN1-RGnN1_QSZ1', 'RGnN2_AN1-RGnN2_QSZ2')
GROUP BY
DATEADD(MINUTE, DATEDIFF(MINUTE, 0, readingDate), 0)
ORDER BY
readingNoSec DESC

SELECT
b.readingNoSec AS Od,
a.usage - b.usage AS Zużycie
INTO
#tempTable1
FROM
#grouped AS a
INNER JOIN
#grouped AS b
ON
a.readingNoSec = DATEADD(MINUTE, 15, b.readingNoSec ) --cut off secounds
AND
b.readingNoSec >= :startDate
AND
b.readingNoSec <= :endDate
ORDER BY
b.readingNoSec

SELECT
DATEADD(MINUTE, 30, (SELECT MAX(Od) FROM #tempTable1)) AS Od,
0.0 AS Zużycie
INTO
#tempTable2;
SELECT * FROM #tempTable1
UNION ALL
SELECT * FROM #tempTable2
ORDER BY Od;

```

Query add reading from two electricity meters in specified time, rounded to minutes.

Does someone know what`s wrong?

---

<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:** [October 1, 2025, 12:15pm UTC](https://forum.inductiveautomation.com/t/time-series-chart-ghost-data/111125/2 "2025-10-01T12:15:45Z")

</div>

You've posted your code as a quotation instead of preformatted text, so we've lost your indentation and syntax highlighting. Can you edit to fix (rather than post it again)?

Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<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:** [October 1, 2025, 12:22pm UTC](https://forum.inductiveautomation.com/t/time-series-chart-ghost-data/111125/3 "2025-10-01T12:22:47Z")

</div>

Regarding the problem: you haven't shown the Dataset Editor view but you have shown a Perspective Table view which, presumably, is the same as the Dataset Editor view.

The [Perspective - Time Series Chart | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-chart-palette/perspective-time-series-chart#properties) Properties section, _series_, states:

> Each value entry consists of a timestamp ( **which must be the first value** ) and one or more values that were captured at that time.

You need to reorder the columns in your query (which needs to be reformatted for ease of reading).

---

<div class="post-metadata">

**Author:** ![Rafal\_Samoraj](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@Rafal\_Samoraj](https://forum.inductiveautomation.com/u/Rafal_Samoraj)\
**Post date:** [October 2, 2025, 10:55am UTC](https://forum.inductiveautomation.com/t/time-series-chart-ghost-data/111125/4 "2025-10-02T10:55:52Z")

</div>

I just forgot attach the picture.

 ![obraz](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/5/15511b03155557d325e8936e21692cda7cfe2dcc.png)

My dataset is fine.  
Any other ideas?
