Can't get Smart number TY/LY comparisons to work as expected

I’m new to metabase and i’m trying to setup some basic reporting for my team. I’m working with retail sales data and we constantly need to run reports like TY/LY comparisons or “next month, last year” . I’ve read a few tutorials about trends and smart numbers being a good way to do this, but so far have not had good results graphing, I always get stuck with a graph of a single period of time or a smart number telling me the difference.

I want to end up with a dashboard where users can select time periods for comparison. I’m comfortable writing the raw sql if needed, but I was hoping to get away from it by using metabase. Whats the best way for me to set this up?
Thanks in advance for any help !

Hi @s98754
Have a look at this blog post:

Thanks, that looks like a good start.
Rather than hardcoding the date, is there a way to do something like “today-30” using the query builder or is that not possible?

edit: I just found this, is this a good solution?

@s98754 Currently no, the expression editor has only limited understanding of date functions: - upvote by clicking :+1: on the first post

Yes, if you convert the questions to SQL, then you have much more control, but you said that you wanted to avoid that, so that’s why I didn’t gave that as a suggestion.