One of the easiest ways to handle the requirement for extra date-based objects, like business day, weekend, etc., is to create a separate table that contains the date, then columns for month, day of the week, weekday flag, etc.
e.g.
Date Month Quarter Day of week Weekday? …
10/6/98 October 3Q Tuesday 1 …
(this takes a little while (you can use excel to generate the patterns easily), but you may be able to find examples on one of the data warehouse sites), then join it to your other tables. The object would then be a sum(weekday flag), assuming you’ve used “1” as the flag…
Timo
Our users require the ability to count business days verses just
days.
Has anyone developed a solution/technique to accommodate this need?
Unfortunately I no longer have details, but at a previous company, a co-worker created a stored procedure to do this and then edited the main file that stored the available functions for the database so that a “business days” function appeared. This was using Cognos but maybe the technique can be similarly handled in BusObj???
Cori Griswold
PricewaterhouseCoopers
Our users require the ability to count business days verses just
days.
Has anyone developed a solution/technique to accommodate this need?
Question: Our users require the ability to count business days verses just
days.
Has anyone developed a solution/technique to accommodate this need?
Reply: This may not be the best solution but it works for me.
Use the Variable DayNumberOfWeek(). This will let you know what day of the week the date fell on 1=Monday, 2=Tuesday, 3=Wednesday… and so on. When I use this I add a variable that says If < 6(which represents Saturday) Then Count() Else 0. Then I do a sum on the Count by Date Range. The only problem is that this will not work for Holidays.
Hope that this helps.
DebraAnn Braun
Frito Lay, Inc