Display value this month and month of previous year


I have stored one or more values per day in an InfluxDB. Now I would like to create a bar chart with the values from the current month and the month from the previous year.
What I can do is create a chart with “current January” and “January 2024”.
What I have not managed to do is “current January” and “January previous year”.

How can I do that?

Thank you