Dynamic Date Condition

Hi

Is it possible to adapt the conditions of date filters, so that TODAY() is a dynamic field that changes when the visualisation is refreshed? Please see an example below:

  • I have a list of appointments for different staff, that I want to see in a bar chart.
  • I don’t want the bar chart to include appointments in the future, as I want the focus to be what has actually happened
  • I can use a condition of appointment_date before TODAY
  • When I refresh the data the following day, it will have previous date as the condition, rather than current date

Thanks
Ben

1 Like

Hi Ben,

Yes, you can certainly achieve the goal:

  • In the filter, please use the operator “Matches”
  • Then in the text box, please fill in “beginning until today” and it shall work fine!

Please let me know if this helps!

Perfect Tuan,

That has worked perfectly.

Thanks
Ben

1 Like

@tuan.nguyen Thanks for the answer, we’ve been running into the same question.

It would be nice if you could set a dynamic today() on other operators as well. For example being able to set “before today” or “after today”. Being able to use those operators would be great, and is also what we tried to implement before reading this suggestion.

4 Likes

Thanks Daam, well noted! Let me pass this over to the Product team!

Searched or the same functionality on the date filters documentation. However, the word “beginning” is not mentioned there.

Thanks, Roman, let me add this to the docs.

Basically, there’re 2 things:

  • beginning: this equal to “1970-01-01” which is the earliest day for our system
  • until today

btw. is there also sth. like the opposite of “beginning” like “end” to achieve already, what @daampie mentioned regarding the “before” and “after” filtersn?

In my eyes, filtering for data that is either in the past (also maybe before 1970 - simply before today) or in the future (after today) is absolutely helpful.