Bar chart with count () every day


i want to have with Grafana and FLUX language a bar chart where I count the number of database entries of a specific datapoint and put it in a bar chart and show it from the last 2 or 4 weeks - it should be the whole da and not dependant of the time range which is defined.
I don’t know how to do that because with FLUX everything is totally different than with InfluxQL.

It should look like this:

Hi @seqway,
You can define fix time range with:
|> range(start: -2w, stop: now())


Full query in which I number of rows in _field running per day:

from(bucket: "test")
  |> range(start: -2w, stop: now())
  |> filter(fn: (r) => r["_measurement"] == "processes")
  |> filter(fn: (r) => r["_field"] == "running")
  |> filter(fn: (r) => r["host"] == "monitoringserver") 
  |> aggregateWindow(every: 1d, fn: count, createEmpty: false)
  |> yield(name: "daily_count")



Note: My server was not running for days (06-14.2.2023) which are missing from graph.


Best regards,