How to track a monthly value of items

Hi! I am making an app that handles the checking in and out of items. I will use a library and their books as an example.

I would like to track how many books a library checks out each month. I have set up a tracker that tracks the total number of books by adding a workflow step that adds a “:count” of the number of books checked out in a single session, but I am not sure how to break that up by month.

How do I organize monthly data in my database? How do I connect a date to the general count so I can find the monthly checkouts at a library? Thanks!

1 Like

I’d go with 2 datatypes : book and log

  • books
    – name

  • log
    –type (in or out, could be a text or an option set)
    – book (reference to books)
    –time (date)

Each time somebody checks in or out, you create a log object.

Then when you want your stats you do a search for logs. Here you need to :group and :aggregate to group your data by book and by month, and outputs the count (aggregation)

If it’s ok for you to use a translator on this page, I’ve made an example here of grouping and aggregation : Bubble | No-code apps

This worked! I had a log datatype and I built a place for admins to see this data. Thank you!