Page 1 of 1

Tough One-Working Days RULE !!

Posted: Tue Apr 08, 2014 5:42 am
by mukeshrajdass
Hi

I need to create a rule to populate a cube with Dimension Months & Years with "working days" (excluding Sat & Sun & ignoring public holidays)...

Something similar to..
['WorkDays','2014'.'01']=N:Dayno('2014-01-01')-Dayno('2014-02-01')-1; <==but taking the sat & sun out...

No lookup cubes...thx

The only viable alternative is to create a TM1 Process entering the parameter of the 1st day of the Year and what weekdays is it for it to loop through the year and update the days ignoring SAT and SUN. Not the best.

Any bright ideas ???

Thx

Re: Tough One-Working Days RULE !!

Posted: Tue Apr 08, 2014 9:00 am
by lotsaram
Why is it a "tough one" and why "no lookup cubes ...thx"?

If a behind the scenes lookup cube is the best way to solve a problem then why would you exclude this?

Note: I'm not saying that a lookup cube is the best way to solve this (it may well be), but I don't see why you would reject that approach out of hand.

Re: Tough One-Working Days RULE !!

Posted: Tue Apr 08, 2014 9:55 am
by rmackenzie
mukeshrajdass wrote:No lookup cubes...thx
I agree with Lotsa - the effort to re-evaluate the rule every time you need to refer to the value will be much more than is required to refer to a static, pre-evaluated value in a look-up cube. As the number of weekends in a month is static (unless you have a 'Planet' dimension) then why not use the look-up?
mukeshrajdass wrote:I need to create a rule to populate a cube with Dimension Months & Years with "working days" (excluding Sat & Sun & ignoring public holidays)...
TM1 doesn't have useful Excel functions such as WORKDAY or NETWORKDAYS. A 'first principles' approach is outlined here but gives fractions of days as part of its output... probably not what you wanted.

I would write a TI that populated the attribute - working days in month - and refer to it in a rule. You'd only ever need to run this once as an initialisation.