# Bar chart don't work

**URL:** <https://forum.inductiveautomation.com/t/bar-chart-dont-work/86209>\
**Category:** Ignition\
**Tags:** ignition80, database, vision\
**Created:** [February 22, 2024, 6:44pm UTC](https://forum.inductiveautomation.com/t/bar-chart-dont-work/86209 "2024-02-22T18:44:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonio.sanchez](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@antonio.sanchez](https://forum.inductiveautomation.com/u/antonio.sanchez)\
**Post date:** [February 22, 2024, 6:44pm UTC](https://forum.inductiveautomation.com/t/bar-chart-dont-work/86209/1 "2024-02-22T18:44:55Z")

</div>

Hello

I have a bar chart, in this bar chat have the next query:

```auto
DECLARE @FechaInicial DATE = '2023-01-01';
DECLARE @FechaFinal DATE = '2024-03-30';

;WITH PrimerDia AS (
    SELECT 
        YEAR(Fecha) AS Anio,
        MONTH(Fecha) AS Mes,
        Linea,
        Dato AS DatoPrimerDia
    FROM Dato_Medidor
    WHERE DATEPART(DAY, Fecha) = 1
        AND Fecha BETWEEN @FechaInicial AND @FechaFinal
        AND DATEPART(HOUR, Fecha) = 7
        AND DATEPART(MINUTE, Fecha) = 0
),
UltimoDia AS (
    SELECT 
        YEAR(Fecha) AS Anio,
        MONTH(Fecha) AS Mes,
        Linea,
        Dato AS DatoUltimoDia
    FROM Dato_Medidor
    WHERE DATEPART(DAY, Fecha) = DAY(EOMONTH(Fecha))
        AND Fecha BETWEEN @FechaInicial AND @FechaFinal
        AND DATEPART(HOUR, Fecha) = 7
        AND DATEPART(MINUTE, Fecha) = 0
)
SELECT 
   -- p.Anio,
   -- p.Mes,
    p.Linea,
    u.DatoUltimoDia - p.DatoPrimerDia AS Diferencia
FROM PrimerDia p
INNER JOIN UltimoDia u ON p.Anio = u.Anio AND p.Mes = u.Mes AND p.Linea = u.Linea
ORDER BY p.Anio, p.Mes

```

and I received this

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

but in the bar chard I can't see this result

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

only see the firts result but the other I can't see and I haven't received an error

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 22, 2024, 7:03pm UTC](https://forum.inductiveautomation.com/t/bar-chart-dont-work/86209/2 "2024-02-22T19:03:10Z")

</div>

You've supplied the extra data as more rows, when it should be more columns (DifferenciaA, DifferenciaB, DifferenciaC or something like that.)
