Custom time range for panels in a dashboard

Being new to Grafana, I’m trying to add custom time ranges for my panels in a dashboard. Trying to only get data for the previous month. Currently, this is what I have:


and it shows my the current month as well, which I don’t need.
This is the query I’m using:

I’ve tried setting the relative time to 1M/M-1M but it throws me an error.

Also, is there documentation on how to customize time ranges? I could only find this one page: Grafana - Timerange