If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Business days question

Started by actcognosuser, 05 Jan 2011 12:41:41 PM

Previous topic - Next topic

actcognosuser

All,
      I am working on a retail  project.

I need to calculate business days  based on order day.

i.e I need the actual shipping date = 2 business days after order is placed.

Thanks in advance




Lynn

You might first see if there is an ETL approach that could be used instead of a calculation on the reporting side. You can certainly build some logic in the report that looks at what day of the week the order was placed and then do the correct math to skip weekends, but you may find exceptions cause an incorrect result from a business standpoint.

For example, what about holidays? They are not business days but are not always easy to compute.
...If there is more than one location (country) that does the shipping then holidays will vary depending on which place you're talking about.
...After a recent snowstorm a state of emergency was declared and some businesses closed so it wasn't a business day after all.

If they don't care about that, then I think the basic logic you need is to add 4 days when the order is on a Thursday, 3 days when the order is on a Friday, 2 days all other days of the week.

case _day_of_week([OrderDate],1)
when 4 then _add_days ([OrderDate],4)
when 5 then _add_days ([OrderDate],3)
else _add_days ([OrderDate],2)
end

actcognosuser

Thanks Lynn. But the business need to to accomodate all the holidays and shipping is in USA only.So
thats one less thing to worry about .