• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 367
  • Last Modified:

Months in Bands or Ranges

Does anyone have a good formula to show bands/ranges of date differences in months? I want one that reads really easily in a report and I think mine's confusing. I want the bands to display in 4 month increments like 0-4 months, etc...
But is it confusing to read that wonder if it includes everything that ends at 120 days and the next band 5-8 months equals something that could equal 121 days but isn't really 5 months. What's a good way to represent bands in months?

Months_Band: IIf(DateDiff("d",[Start_Date],[End_Date])<30,"<30",IIf(DateDiff("d",[Start_Date],[End_Date])<60,"<60",IIf(DateDiff("d",[Start_Date],[End_Date])<90,"<90",IIf(DateDiff("d",[Start_Date],[End_Date])<120,"<120",...
0
error_prone
Asked:
error_prone
  • 7
  • 5
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
how about this

Months_Band: IIf(DateDiff("m",[Start_Date],[End_Date])<5,"0-4",IIf(DateDiff("m",[Start_Date],[End_Date])<9,"5-8",IIf(DateDiff("m",[Start_Date],[End_Date])<13,"9-12","13 and above")))
0
 
error_proneAuthor Commented:
DateDiff in months to me is inaccurate because the last day of Jan and the first day of Feb shows as 1 month.  I think 30 day increments is more accurate.  
0
 
Rey Obrero (Capricorn1)Commented:
Months_Band: IIf(DateDiff("d",[Start_Date],[End_Date])<121,"0-4",IIf(DateDiff("d",[Start_Date],[End_Date])<271,"5-8",IIf(DateDiff("d",[Start_Date],[End_Date])<367,"9-12","13 and above")))
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
error_proneAuthor Commented:
I changed it to 6 month increments.  Do you think this formula reads accurately or is easy to understand?  I noticed you used less than 121 and I would have used <= 120.  What does the difference mean to you?
Months Band: IIf(DateDiff("d",[Start Date],[End Date])<=180,"0-6",IIf(DateDiff("d",[Start Date],[End Date])<=360,"6-12",IIf(DateDiff("d",[Start Date],[End Date])<=540,"12-18",IIf(DateDiff("d",[Start Date],[End Date])<=720,"18-24",IIf(DateDiff("d",[Start Date],[End Date])<=900,"24-30",IIf(DateDiff("d",[Start Date],[End Date])<=1080,"30-36",IIf(DateDiff("d",[Start Date],[End Date])<=1260,"36-42",IIf(DateDiff("d",[Start Date],[End Date])<=1440,"42-48","48+"))))))))

Open in new window

0
 
error_proneAuthor Commented:
If you wanted to know the age of a receivable, would this look accurate to you?
0
 
Rey Obrero (Capricorn1)Commented:
<=120  is also the same as <121

<If you wanted to know the age of a receivable, would this look accurate to you?>
aging of receivables are normally counted by days;

0-30 days
31-60 days
61-90 days

etc..

0
 
error_proneAuthor Commented:
Ok, scrach the receivables comment.  Would you do a 6 month range band like the formula above, (in 30 day increments), or seperating it by 365/2 calculations?  So if you read "6-12 months", is the formula <=180 accurate or <=182.5 more accurate to you?
0
 
error_proneAuthor Commented:
Sorry, I meant 0-6 months.  
0
 
Rey Obrero (Capricorn1)Commented:
error_prone,
what exactly are you trying to do?
0
 
error_proneAuthor Commented:
Sorry, I'm not being clear.  I'm not really looking for a "right" formula, I'm looking for an opinion in how it should be represented.  I'm looking at assets like inventory and trying to see what the best way to represent age of inventory is.  I'm wondering if it should be 30 day increments which would lead me to use <=180 for the first IIF formula or <=182.5.
0
 
Rey Obrero (Capricorn1)Commented:
well, it depends. It can be in days, weeks, months or years..

why not ask your client as to how they want it represented.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
From my viewpoint, the "correct" values would be whatever is best suited for your particular business. In some cases you need exact calendar days - for example, when you hit February, you'd need to consider whether we're in a Leap Year or not in order to be accurate. If you're not overly concerned about that, then a generic "Quarter" or "3 months" would be 90 days (although that doesn't add up to 364 or 365 days).

Even with Inventory items, ranges can be specific. You certainly need to be much more concerned with the number of Days you've stored dairy products than you would be with the number of Days you've stored paper bags.

For most purposes, it's fine to simply do as Cap suggested earlier, and use the 30 day increment. In other cases, it's not. The choice is yours, and unfortunately we really can't make it for you.
0
 
error_proneAuthor Commented:
No, you're right.  I was leaning towards 30 day increments but was really looking for different opinions.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now