Forum Discussion

JulieMeeker's avatar
JulieMeeker
Qrew Trainee
6 months ago

Calculating a room available days

I have an app that tracks employee accommodations and there are about 650 units.  I am trying to figure out the units availability over a range of dates  I know when the unit is occupied because I have a "reservation" record with a start and end date.  So I'm trying to report when there is not a reservation.  The reservations are not necessarily back to back so say within the month I need to show the available days.  Any ideas on how to report on what's not there?   



------------------------------
Julie Meeker
------------------------------

2 Replies

  • Since you're trying to report on something that doesn't exist - you'll have to create something new that Quickbase can report on to isolate that type of information. I would recommend making a new table called 'Unit Days' or something like that. Its a child table to Units that really only needs 2 fields - the related Unit and a date field to designate the day. 

    You essentially want each record to represent that specific day of the month in relation to that unit - so each unit has a record for each calendar day. You can manually import the records using excel and import the next 5 years worth if you want to have it all set up. 

    Since you already have the reservations setup - the easiest option would be to use formula queries to check each of these unit days and evaluate if that day falls within an existing reservation. Your just querying to see if a reservation exists that starts on or before the unit day in question and ends on or after that day, and if a record exists you know it's occupied. 

    Your reporting can really then be whatever you want it to be. You could make formula query response a text field for occupied / vacant, you could make it a checkbox to just be true false for reporting, whatever makes the most sense. Plot it on a calendar, table report, summary report etc. 



    ------------------------------
    Chayce Duncan
    ------------------------------
    • JulieMeeker's avatar
      JulieMeeker
      Qrew Trainee

      Thank you.  That is what I was thinking that I have to do.  Now on to building it!



      ------------------------------
      Julie Meeker
      ------------------------------