Filter time window

Hello,

I would like to be able to define a window to query for something, example:

Previous: 30 days and Next: 60 days

44%20PM

52%20PM

Right now I can only do this with hard-coded dates (not moving), or with SQL.

Thank you,

Hi @danilo
I don't think I understand. Your request is the same as your screenshots.

Hi @flamber, being able to define a window of time, for example, last 30 days until next 30 days, so 60 days in total, 30 looking back and 30 looking forward.

Right now the only way I have to do this is using raw SQL.

@danilo Custom Expressions are your friend:
https://www.metabase.com/docs/latest/users-guide/expressions.html
Example:

interval([Created At], -30, "day", "include-current") OR interval([Created At], 30, "day")
1 Like