Button to change interactive filter to previous day?

Good morning!
If I have an interactive filter on a date column, is there a way I can create a button that will subtract one day from the current filtered value of the interactive filter? So if the current value is today, when I hit the button the date changes to yesterday? And if I hit the button again, the date changes to two days ago?

Many thanks for any help with this!

Gregg

Hey @Gregg_Stebben I’ve accomplished similar effects by creating a [Variables] table where you can have a pair [Variable] and [Value]. Then use @[Variable].[Value] to retrieve and edit the value. Set the filter to parse that value and create logic around how you want to change the values. You will see that this opens up a lot of functionality in your doc. Let me know if you have any questions!

2 Likes

Hey @Gregg_Stebben ,

sure, your button formula should look something like this:

SetControlValue([datepicker 1], [datepicker 1]-1)

Best regards

Marius

2 Likes

Hi, @Johg_Ananda … this is intriguing … would you consider sharing an example so I could use it as a model? Thank you! Gregg

Hey @Gregg_Stebben here is a solution I did for another post that handles the same scenario you are considering, just going forward in time. I’ve got two solutions there, the ‘Cycle on Canvas’ builds on the concept I mentioned in my prior response:

I think you can look at the buttons and adapt it for your situation; if not let me know and I'll walk you through it.
2 Likes

Beautiful! Thank you!!

Hey @Johg_Ananda … thanks for the reminder that someday I need to take the time to master “If” functions…but between now and then, I am grateful to you for sharing your work with me! Thank you!

1 Like