692 Views    -    3 Replies


Username Post: Using start and end dates for year on year analysis        (Topic#209693)
Your continued generosity and support of FMForums is greatly appreciated.
Andy H 
newbie
Posts: 5

Post Rank (AVG):
            


FMP: 10 Advanced
OS: Mac OS X Leopard
Skill: Intermediate



Tweet This! Tweet This Post!
   Welcome Andy H's first post!
06-20-09 01:28 PM - Post#333899     - Post Rank:             


Hi there,

I've been scouring the forums and racking my brain to try and find a solution for the following problem:

I'm looking to be able to compare rates on a year on year basis down to the day and or week. To enter the data in a user friendly format I have 3 fields; a start date, end date and rate that is applicable for the period. For example:

01/11/09 - 04/11/09 $400
05/11/09 - 22/11/09 $450
23/11/09 - 01/12/09 $400

The above is an example of some rates for 2009 and below is an example of the rates from 2010 that I'd like to compare:

01/11/10 - 03/11/10 $440
04/11/10 - 20/11/10 $450
21/11/10 - 29/11/10 $440

As you can see the rate period may vary by a few days each year hence why I'd like to be able to drill down to a day by day analysis as well as week by week compared to the previous year.

I am able to create a field that generates all the days between the start and end date, but I'm struggling to be able to implement this in any usable format so that I can calculate year on year rate differences. The kind of result I'm looking to achieve is a percentage increase YOY:


Day 2009 v. 2010
01/11 +10%
02/11 +10%
03/11 +10%
04/11 +11%
05/11 0%
06/11 0%
etc....

Many thanks for your advice










comment 
consultant
Posts: 15762
comment

Post Rank (AVG):
            


FMP: 7 Advanced
OS: Mac OS X Panther



Tweet This! Tweet This Post!
06-20-09 01:56 PM - Post#333901     - Post Rank:             
    In response to Andy H

Well, it doesn't seem too difficult, except for this: how do you want to handle the case where one of the two years being compared is a leap year?










Andy H 
newbie
Posts: 5

Post Rank (AVG):
            


FMP: 10 Advanced
OS: Mac OS X Leopard
Skill: Intermediate



Tweet This! Tweet This Post!
   This is Andy H's second post.
06-21-09 10:46 AM - Post#333941     - Post Rank:             
    In response to comment

That's a good point. In the event of a leap year e.g. 29 Feb 2012 the rate cannot be compared to the previous year or subsequent year since the 29th Feb will not exist. In this instance I'd treat the 29th Feb as +100% increase in rate from the previous year.










Your continued generosity and support of FMForums is greatly appreciated.
comment 
consultant
Posts: 15762
comment

Post Rank (AVG):
            


FMP: 7 Advanced
OS: Mac OS X Panther



Tweet This! Tweet This Post!
06-21-09 11:04 AM - Post#333942     - Post Rank:             
    In response to Andy H

I suppose that too would be possible, but rather difficult to build - because Filemaker automatically adjusts Date ( 2 ; 29 ; <non-leap year> ) to March 1.

The attached file is very easy to implement and it simply skips February 29. It shouldn't be too hard to adjust it to include February 29 when both years being compared are leap years.

Attachment: YearsDailyComparison.fp7.zip (11.29 KB) 88 View(s)












Icon Legend Permissions Topic Options
Print Topic

Email Topic

692 Views
Welcome Guest...
Enter your username and password to login. If you do not have a username you can register one here

Username

Password

Remember me. Help



Forgot Password...


Quick Links
Recent Posts
Active Topics
No Replies
Recent Files
Functions & Scripts
FileMaker Pro Help
FileMaker on Twitter
FileMaker Marketplace

Custom Search

Find FileMaker Developers

Don't have time to wait,
hire a developer now!

Recent Members
Welcome them to our community!
Find FileMaker Jobs

Want a new career?
Find your new job now!

Joy of Tech
Latest Joy of Tech!

Recent Topics
Recent Hot Topics
Contribute
With your generosity we can make some real magic happen!. Support your favorite online FileMaker community...
FM Forums.com


Click here...


Or a Donation of any amount.


Thanks for your support!

Active Blogs
0 Recent blogs:
People to Post Lately in this Topic
Andy H
comment
FM Forums Advertisers


FusionBB™ Version 3.0 FINAL | ©2003-2010 InteractivePHP, Inc.
Execution time: 0.479 seconds.   Total Queries: 62   Zlib Compression is on.
All times are . Current time is 08:34 PM
Content ©1996-2008 Ocean West Consulting, Inc. All Rights Reserved
Ocean West Consulting, Inc. can not and will not be held responsible for any of the contents in this site.
FM Forums™ is a trademark of Ocean West Consulting, Inc an independent entity, not affiliated with FileMaker Inc.
FileMaker® is a registered trademark of FileMaker Inc.
Top