Page 1 of 2 1 2 >
Topic Options
#8587 - 03/08/07 08:44 AM Monthly Occupancy Stats
Fullen Offline
Adagio Fan

Registered: 02/14/07
Posts: 32
Loc: Banff
Please advise the formula to report the # days past within the selected periods.

My objective is to provide occupancy percentages for each month and YTD as well. Ideally, only days past would be included in the statistics.

eg. 100 Rooms available each day in January equals 3100 rooms available to sell. Sold rooms of 2100 would equate to 67% occupancy.








Edited by Fullen (03/08/07 08:46 AM)

Top
#8588 - 03/08/07 09:29 AM Re: Monthly Occupancy Stats [Re: Fullen]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hello Fullen,

Assuming you'd like the number of days in the selected fiscal period, the easiest way is to retrieve the starting and ending dates for the period, subtract them and add 1. The formula to do this would be:
Code:
=(ADGET("gldates.END","C"&FPERIOD())-ADGET("gldates.START","C"&FPERIOD()))+1
_________________________
Andrew Bates

Top
#8603 - 03/09/07 08:47 AM Re: Monthly Occupancy Stats [Re: Retired_Guy]
Fullen Offline
Adagio Fan

Registered: 02/14/07
Posts: 32
Loc: Banff
This is a start...

This formula only relates to the # of days in the current month of the report.

I am looking to complete a report for the year, something like this:
I have 99 Rooms Available each day:
YTD NOV DEC JAN FEB MAR APR MAY
Rooms Sold 7700 800 2400 2000 2500
Rooms Avail 11800 2970 3069 3069 2772
# Days Avail 120 30 31 31 28
Occupancy % 65% 26% 78% 65% 90%

The formula provided will only provide the # days in the reported fiscal month. For past months, the # changes to the current month's number of days.

I could just drop the number of days on a line and show the occupancy each month but the YTD stats don't jive. Perhaps I just need the formula for the YTD column.

Top
#8604 - 03/09/07 09:16 AM Re: Monthly Occupancy Stats [Re: Fullen]
Fullen Offline
Adagio Fan

Registered: 02/14/07
Posts: 32
Loc: Banff
I have it working now by using IF statements so that if there are zero rooms sold, the values of the future months are listing zero rooms available and thereby not added into the YTD.

This doesn't work when all past months are not represented on the report. For instance,

MTD YTD LY MTD LY YTD



Edited by Fullen (03/09/07 09:19 AM)

Top
#8606 - 03/09/07 09:45 AM Re: Monthly Occupancy Stats [Re: Fullen]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hello Fullen,

You can find the number of days between two dates by subtracting them. For example:
Code:
=(TODAY()-DATE(2007,01,01))+1

gives the number of days YTD. There are a comprehensive list of date functions in the financial reporter (check the help). For example:
Code:
=(DATE(YEAR(TODAY()),MONTH(TODAY()),1)-TODAY())+1

will tell you the number of days that have elapsed in the current month. So would:
Code:
=DAY(TODAY())


You can use an ADGET() call to return the beginning ("gldates.START) and ending ("gldates.END") date of any specific period using the keys:
Code:
"C 1"  = Period 1
"C 2"  = Period 2
"C 3"  = Period 3
...
"C11"  = Period 11
"C12"  = Period 12
-or-
"P 1"  = Period 1 Last year
"P 2"  = Period 2 Last year
...
"P12"  = Period 12 last year.


You can add or subtract the dates returned by the ADGET function just as you can add or subtract a date returned by the DATE() or TODAY() functions.

OK?
_________________________
Andrew Bates

Top
#8608 - 03/09/07 02:02 PM Re: Monthly Occupancy Stats [Re: Retired_Guy]
Fullen Offline
Adagio Fan

Registered: 02/14/07
Posts: 32
Loc: Banff
I will try these... not sure if it will work for my monthy stats YTD occupancies
Thank you for your help.

Top
#8609 - 03/09/07 02:39 PM Re: Monthly Occupancy Stats [Re: Fullen]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hi Fullen,

To calculate the number of days in YTD use:
Code:
=(DATE(TODAY())-DATE(YEAR(TODAY()),01,01))+1


OK?
_________________________
Andrew Bates

Top
#8610 - 03/09/07 02:44 PM Re: Monthly Occupancy Stats [Re: Fullen]
Fullen Offline
Adagio Fan

Registered: 02/14/07
Posts: 32
Loc: Banff
=(ADGET("gldates.END","C"&FPERIOD())-ADGET("gldates.START","C 1"&FPERIOD()))+1

This works for me for current year and P - P 1 for previous year

YEAH!

Top
#8611 - 03/09/07 03:00 PM Re: Monthly Occupancy Stats [Re: Fullen]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hi Fullen,

You don't need the "&FPERIOD()" in the second ADGET() call. The string "C 1" asks the ADGET function to return the starting date for fiscal period 1 in the current year.

Glad it's working for you.

Andrew
_________________________
Andrew Bates

Top
#8644 - 03/14/07 07:27 PM Re: Monthly Occupancy Stats [Re: Retired_Guy]
Fullen Offline
Adagio Fan

Registered: 02/14/07
Posts: 32
Loc: Banff
Just to finish this off, If I use the following string do I still need the &FPERIOD() with the "P 1"?:

=E24/(((ADGET("gldates.END","P"&FPERIOD())-ADGET("gldates.START","P 1"&FPERIOD()))+1)*99)

Top
#8645 - 03/14/07 07:39 PM Re: Monthly Occupancy Stats [Re: Fullen]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hello Fullen,

No, you do not need the second FPERIOD() call.

The formula should be:
Code:

=E24/(((ADGET("gldates.END","P"&FPERIOD())-ADGET("gldates.START","P 1"))+1)*99) 


This formula subtracts the ending date for the current period last year (because you are using "P" before the period number - for the current year you'd use "C") from the starting date of last year's fiscal year.

(Presumably you have 99 rooms available each day, and E24 contains your total room revenue).
_________________________
Andrew Bates

Top
#8655 - 03/15/07 01:17 PM Re: Monthly Occupancy Stats [Re: Fullen]
Bruce Gardner Offline
Adagio Wizard

Registered: 06/15/04
Posts: 3641
Loc: Toronto ON, Canada
No, you do not need the 2nd FPERIOD().

FPERIOD() returns the number of the Fiscal Period that you have selected (i.e. 1 through 12).

Andrew uses the first FPERIOD() to create the parameter to the function ADGET(). For instance, in period 12 you need "P12". It varies depending on the Period you choose.

But in the 2nd ADGET(), you already know that you want "P 1". It will never change. Therefore FPERIOD() is not needed.
_________________________
Bruce Gardner
ARX Business Solutions Inc.

Top
Page 1 of 2 1 2 >


Moderator:  Christa_Meissner 
Who's Online
1 registered (Howard S.-MMA), 180 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Forum Stats
1872 Members
5 Forums
14527 Topics
70937 Posts

Max Online: 432 @ 01/20/25 10:17 PM
August
Su M Tu W Th F Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31