IssueRaiser

Allow relative dates for default values in SQL variables

Per a [Discourse discussion](http://discourse.metabase.com/t/defaulting-dates-in-sql-questions/1250). Right now you can only select a single date, though there are lots of times where you'd want the default to be "today" or "last 30 days": ![screen shot 2017-03-09 at 12 24 49 pm](https://cloud.githubusercontent.com/assets/2223916/23769210/86c0f9ae-04c3-11e7-8e89-b998c5ddb1ac.png) I suppose the challenge is that many of our relative date selections are actually `between` clauses, meaning you're actually mapping to two variables. There are some exceptions, such as "today," but not sure how we'd do "Last 30 days" with our current SQL template tags. :arrow_down: Please click the :+1: reaction instead of leaving a `+1` or `update?` comment

Posted by mazameli on Mar 9, 2017, 8:30 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Other)

Allow relative dates for default values in SQL variables

mazameliMar 9, 2017, 8:30 PM

Per a [Discourse discussion](http://discourse.metabase.com/t/defaulting-dates-in-sql-questions/1250). Right now you can only select a single date, though there are lots of times where you'd want the default to be "today" or "last 30 days": ![screen shot 2017-03-09 at 12 24 49 pm](https://cloud.githubusercontent.com/assets/2223916/23769210/86c0f9ae-04c3-11e7-8e89-b998c5ddb1ac.png) I suppose the challenge is that many of our relative date selections are actually `between` clauses, meaning you're actually mapping to two variables. There are some exceptions, such as "today," but not sure how we'd do "Last 30 days" with our current SQL template tags. :arrow_down: Please click the :+1: reaction instead of leaving a `+1` or `update?` comment

Comments (0)

No comments yet. Start the discussion.

Comment on this issue