Réf. : Rolling Time Periods

Mike wrote :

I am interested in finding out how people are creating objects for
rolling
time periods. I need to create an object that will add up three months of
amounts and average them. Also, the month and year need to be taken into
account when reporting in January and February. The time periods and
amounts that will be used are in the same table, should that be a problem?

I give a tip I already posted to the list.
We created in the universe a variable called <month #> which is the
following :
Year*12 + Month (e.g. Feb 1999 is 23990).
Then we have another variable in the universe :
which is <end month #> - <month #> (in our case, we prompt the user for end
year and month).
We can now use this variable as a condition in the query panel, or as a
variable in the report.
For instance, to compare rolling 3 months to last year 3 months, we compare
between 0 and 2 to between
11 and 13.
Hope this helps.

Christophe GROS


Listserv Archives (BOB member since 2002-06-25)