Not sure it that helps, but here is what I am doing to have a date equal to today if the variable is empty:
define the variable “datepick” with a default value, old enough to be not existing in the database (let’s say the DB was empty in 2016, so we define the default value as something in 2016).
Then, let’s say I have a field named creation-date
WHERE date(creation-date) = if(year({{datepick}})=2016,current_date,{{datepick}})
If there is nothing in the date variable field, then the current date will be used, otherwise, the value in the field will be used.
This is more flexible than [[{{date}} #]] current_date() notation, as you can easily use it in more complex situation.
Let’s say I want to select all dates in the last 7 days:
WHERE datediff(if(year({{datepick}})=2016,current_date,{{datepick}}),date(creation-date)) between 0 and 6