Time series chart - ghost data

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

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

Data comes from Named query:

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?

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.

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 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).

I just forgot attach the picture.

My dataset is fine.
Any other ideas?