Page 1 of 1

Rule to Fix a Quarter going forward

Posted: Fri May 03, 2013 4:23 pm
by kkmk
Hi,

I am trying to write a rule that should apply after certain quarter. Say I have 3 years forecasting from 2012 - 2015. But a certain condition, my rule should apply only after 2013-Q3.

My Rule:

['Carryover Units'] = DB('ORAM', !Scenario, !Company, DIMNM('Quarter', DIMIX('Quarter', !Quarter) -1 ), !Product, 'FGI Units', !ORAM_m);

I want to start this rule apply from 2013-Q3.

I tried this for testing but not working:


['Carryover Units'] = IF(
DIMIX('2013-Q4', !Quarter) > DIMIX('Quarter', !Quarter)
, 100
, STET
);

Can you correct my logic?

Thanks
KKMK

Re: Rule to Fix a Quarter going forward

Posted: Fri May 03, 2013 4:38 pm
by lotsaram
Pretty basic
DIMIX('2013-Q4', !Quarter) > DIMIX('Quarter', !Quarter)
should be
DIMIX('Quarter', '2013-Q4') > DIMIX('Quarter', !Quarter)

I doubt you have a dimension called '2013-Q4'

However for this sort of logic you are much better to 1/ not use Dimix and 2/ not have hardcoded constants in the rule
For 1/ hold incrementing index values against each quarter in a time lookup cube and test the index value
For 2/ the trigger period should be an attribute or sting value in a control cube somewhere

Re: Rule to Fix a Quarter going forward

Posted: Fri May 03, 2013 4:56 pm
by kkmk
Yes, I dont have any such Dimensions.

My Rule:

['Carryover Units'] = DB('ORAM', !Scenario, !Company, DIMNM('Quarter', DIMIX('Quarter', !Quarter) -1 ), !Product, 'FGI Units', !ORAM_m);

This is the rule that should apply after current quarter, current quarter value specified in the control cube. Please attach. So i have changed my rule to:

['Carryover Units'] = N: IF(
DB('Control Cube', 'Comment' , 'Current Quarter')> DIMIX('Quarter', !Quarter)
, 100
, STET
);

Re: Rule to Fix a Quarter going forward

Posted: Fri May 03, 2013 9:36 pm
by lotsaram
kkmk wrote:IF( DB('Control Cube', 'Comment' , 'Current Quarter') > DIMIX('Quarter', !Quarter)
Does something look strange? Well it should because you're trying to compare a string to an integer. I'm not going to write you a rule, you can think about it yourself.

Re: Rule to Fix a Quarter going forward

Posted: Mon May 06, 2013 9:46 am
by rozef
You should lookt at NUMBR function. That must be enough to solve your issue.