Monthly bargraph missing values

in my influxdb 1.0 I have a series of data values for daily PV-production where the last value represent this value.
This is my query for daily production.

SELECT
SUM(last_todaykwh) AS “monthly_sum”
FROM (
SELECT
last(todaykwh) AS “last_todaykwh”
FROM
“0_userdata.0.Fotovoltaik.Wechselrichter.Wh_heute_1+2”
GROUP BY
time(24h, -1s)
)
GROUP BY
time(every: 30d)
WHERE
time >= now() - 365d
AND time < now()
TZ(‘Europe/Vienna’)

Then I want to display a bar graph about monthly sum per year of these values.
My influxql query delivers such bargraph but the values differ from the sums of daily values.

SELECT SUM(d)
FROM (
SELECT MAX(“value”) AS d
FROM “0_userdata.0.Fotovoltaik.Wechselrichter.Wh_heute_1+2”
WHERE time >= now() - 370d AND time < now() + 12h
GROUP BY time(1d) fill(none) tz(‘Europe/Vienna’)
)
GROUP BY time(30d,20d) fill(none) tz(‘Europe/Vienna’)

the problem is that the monthly bars contain data beginning 10.day of month but not around first day. How can I shift this back to include all of the daily values.
As only positive values are accepted in statement time(30d,20d) Any shift reduces the number of daily values within same month