I have a repeating panel that repeats on a Dashboard variable, $TimeRanges, which is meant to shift the data reported one week back from the $__to value in the Time Picker. The variable values are 0d, 7d, 14d, 21d,28d. This works great. My query results effectively show data from the current week, 1 week prior, 2 weeks prior, etc.
What I need to do now is to show the date ranges each panel represents, and I’ve been stymied. I tried this but instead of calculating the to and from dates minus the offset $TimeRanges, it simply display the To and From dates and then “-od” “-7d”, etc.
${__from:date:YY-MM-DD}-${TimeRanges} to ${__to:date:YY-MM-DD}-${TimeRanges}
Is this even possible in Grafana? If someone has solved this please share your solution. If this isn’t possible it would be useful to know that too so I don’t keep banging my head trying to solve a problem that isn’t solvable.