I have some daily aggregated data (for previous days, current date is still not aggregated).
There is no datetime column, only date column.
I have a $days_back variable that holds numbers from 1 to 30 that represent for how many days back I need graph.
For example, if current day is 2019-12-24, and $days_back = 5 (not counting today), I will select data for 5 days: 19,20,21,22 and 23.
I would like to show line graph in order to see trends for daily aggregated variables (in the example above, I will have 5 daily numbers, one per day).
Here I don’t need $timeFilter at all because time range is defined by $days_back variable.
Can I show graph regardless of the $timeFilter?
Can $timeFilter be set from the day’s time 00:00:00 in some convenient way?
Can I instead of where $timeFilter use something that will only consider $dateCol?
What are my options?
Here I don’t need $timeFilter at all because time range is defined by
$days_back variable.
Okay.
Can I show graph regardless of the $timeFilter?
Yes - got into the query editor, and use “toggle edit mode” to show you the
query Grafana has constructed and would pass to your backend data store.
Edit this any way you like, remove the $timeFilter, and substitute your own
$days_back value, to get the query you need. You can still use now() in the
query if you wish.
Can $timeFilter be set from the day’s time 00:00:00 in some convenient way?
Not that I can think of, but try putting something like “now/d” into the
“override relative time” field of the “Time range” tab, and “5d/d” into “Add
time shift”.
Then look at the query Grafan would generate for you in the query editor, and
see if you can use that combined with your $days_back value (you’ll probably
need to express is as [[days_back]] to work in this context) to get what you
want.
Can I instead of where $timeFilter use something that will only consider
$dateCol?
What is $dateCol?
But, in principle, using the raw query editor, yes.
What are my options?
Limited pretty much only by the query language of your backend data store.