Display "This Month" with relative time

Hello,

I’d like to display the range “This Month” (first day of current month to last day of current month) in a panel using relative time but I can’t manage to do this and I don’t found any example.

Can anyone help me ?

You have not said which version of Grafana, what data source or what type of panel.

Ah yes, sorry about that. We are using grafana 7.4.3 and it’s a graph panel.

The purpose is to display historical daily values with a forecast until the end of the month.

You still have not said what data source you are using.

it’s an influxdb database (1.8.3)

Does this help?
ThisMonth

1 Like

No. We are already using “This year” as time range for the dashboard (same purpose, display daily values with forecast for the year). That’s why we need something to set a custom time range on some panels and to display “This Month”.

I have not tried this, but acc. to this, you can “manage the time ranges of the data being visualized, both at the dashboard level and the panel level.”

To overide the time range of the dashboard use this little menu inside graph

I know that. But using this field only give the option to display the range [first day of month, current day] (aka. “This month so far”), and not the range [first day of month, last day of month] (aka. “This month”).

Here is what I have using now/M in relative field (note the end date on X-axis right):

When I would like to display this:

Oh! Do you want to show entire month? Me too, but I do not know how to do it, sorry.

So, we want relative time: “This month” instead of “This month so far”

This month so far: now/M (relative time)
This month: 0M/M (time shift)

EDIT: I get it!! First time to me

Use “time shift” field: today is 2021/03/12 (for future viewers and ignore the title of the graph)

3 Likes

I just saw your answer.

Many thanks ! It is exactly what I was looking for.

Hi all
I thought i would jump in here as i’m having the similar issue but we using Prometheus.
I’m trying increase the time range to 1 year but when I change that I only have a graph up to 15 days.
How do i increase my RETENTION? to 1 year on my dashboard.

This topic was automatically closed after 365 days. New replies are no longer allowed.