I’m trying to show financial numbers for the current and past financial years in my dashboard. How do I filter from a certain date to a certain date i.e, sales figures for july-june 2022/2023 financial year.
Any help would be amazing!
Hi there, @mbarber866… it depends on how you are defining the from and to dates in your app, but what you described could be as simple as adding two constraints and using the Arbitrary date/time operator to “hardcode” the dates. So, like this…
Here is the first arbitrary date constraint.
Regardless of how you are defining the dates, you are going to use constraints that are similar to what I showed, so I hope this helps.
Thank you! that worked!
One more question, If I wanted to have sales data for the ‘current month’ would I have to do the same and edit it the constraints every time we enter a new month?
Nah, Bubble would be quite lame if you couldn’t define the current month dynamically, and for any/all of the reasons that someone might consider Bubble to be lame, that ain’t one of them.
To get the current month, the constraints would be…
Created date >= Current date/time:rounded down to month
Created date < Current date/time:rounded down to month+(months): 1