Time Filter for the current month

I'm wondering if there is a way to filter the current visualization for the current month.
What I need is a time range from the start of the current month month to now. I tried creating a new quick filter but I dind't find a way to calculate the first day of the current month.
Is there a way to do that?
Thank you.

Hello Mattia,

Did you try the time filter? It has a filter for the last 30 days which may work for you. If you're looking for something more custom, this solution might work.


Hi Aaron, thanks for your reply.
I'm alredy using the time filter but, as I said in the question, I don't need the last 30 days, I need the current month. For example I need from the first of January to now. The solution you linked doesn't work in Kibana 7.5.1. The filter show the exact string "now/M-1" instead of a calculated date.

This should work for "current month":
"from": "now/M",
"to": "now",
"display": "This month"
The first part rounds down current date to the month and the second part is just "now", so you get all the data from the start of the month until now. And I tested it on 7.5.1 so it should work.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.