Bar chart don't work

Hello

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

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

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

image

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

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

1 Like