Page 1 of 1

Rules based Values not showing in EV - Feeder Problem?

Posted: Wed Jun 03, 2009 11:30 pm
by damientaylorcreata
Hi Guys,

I have created a new cube in TM1 (Inventory Cube). This includes all Inventory movements. However from the movements I have created a collection of rules to determine the Stock on Hand for a particular year, month, day combination. This works perfectly in Perspectives. However in EV this field shows up as blank. But the funny thing is that when I change to Data Entry mode in EV they all appear!

Is this by any chance a problem with my feeders? If it is a problem with my feeders, wouldn't this mean that the values would not be showing in Perspectives either?

I have included below my rules and feeder:

Code: Select all

SKIPCHECK;

['SOH - Balance'] = C: if(!Period @= 'Feb' & !Measure @= 'SOH - Balance',  (['SOH - Movement','Period':'No Month','Day':'00']) +(['SOH - Movement','Jan', 'Full Month']) +(['SOH - Movement','Feb']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Mar' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Feb YTD', 'Full Month'])+(['SOH - Movement','Mar']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Apr' & !Measure @= 'SOH - Balance',  (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Q1', 'Full Month'])+(['SOH - Movement','Apr']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'May' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Apr YTD', 'Full Month'])+(['SOH - Movement','May']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Jun' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','May YTD', 'Full Month'])+(['SOH - Movement','Jun']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Jul' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Q2 YTD', 'Full Month'])+(['SOH - Movement','Jul']),CONTINUE);
['SOH - Balance'] = C:if(!Period @= 'Aug' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Jul YTD', 'Full Month'])+(['SOH - Movement','Aug']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Sep' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Aug YTD', 'Full Month'])+(['SOH - Movement','Sep']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Oct' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Q3 YTD', 'Full Month'])+(['SOH - Movement','Oct']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Nov' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Oct YTD', 'Full Month'])+(['SOH - Movement','Nov']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Dec' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Nov YTD', 'Full Month'])+(['SOH - Movement','Dec']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Feb YTD' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Jan', 'Full Month'])+(['SOH - Movement','Feb']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Apr YTD' & !Measure @= 'SOH - Balance',  (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Q1', 'Full Month'])+(['SOH - Movement','Apr']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'May YTD' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Apr YTD', 'Full Month'])+(['SOH - Movement','May']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Jul YTD' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Q2 YTD', 'Full Month'])+(['SOH - Movement','Jul']),CONTINUE);
['SOH - Balance'] = C:if(!Period @= 'Aug YTD' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Jul YTD', 'Full Month'])+(['SOH - Movement','Aug']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Oct YTD' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Q3 YTD', 'Full Month'])+(['SOH - Movement','Oct']),CONTINUE);
['SOH - Balance'] = C: if(!Period @= 'Nov YTD' & !Measure @= 'SOH - Balance', (['SOH - Movement','Period':'No Month','Day':'00'])+(['SOH - Movement','Oct YTD', 'Full Month'])+(['SOH - Movement','Nov']),CONTINUE);

['SOH - Balance'] = C: (['SOH - Movement','Period':'No Month','Day':'00']) +(['SOH - Movement']);

Feeders;

['SOH - Movement'] =>['SOH - Balance'] ;

Could somebody please explain why SOH - Balance shows figures in Perspectives, but not in EV?

Please let me know if I can provide any other information to help.

Re: Rules based Values not showing in EV - Feeder Problem?

Posted: Thu Jun 04, 2009 12:37 am
by damientaylorcreata
Hi Guys,

I have found the problem. It was due to the C: in front of the rule.. For some reason it seems that EV does not not rules that are made up from consolidations. I did a very simple rule to test this and it didn't show up in EV either:

Code: Select all

['SOH - Balance'] = C: ['SOH - Movement'];
Feeders;
['SOH - Movement'] =>['SOH - Balance'] ;
And this didn't work in EV, until I removed the C: and then it showed up.

Is this a bug with EV? Or is it something that I am doing wrong? Do I need to feed a consolidation differently to an N level rule?

Re: Rules based Values not showing in EV - Feeder Problem?

Posted: Thu Jun 04, 2009 7:31 am
by Steve Rowe
Hmmm, well not sure about the EV part I would have thought it would work if the values are feed correctly.

The thing to remember with feeders is that they only do work at the N level in the cube, it's impossible to feed a C level, you have to feed the N levels below it.

So in your example (I'm guessing) you have written a rule that applies only at the C level and that the N level of the 'SOH - Balance' is not populated and does not have another rule. Since there is no value at the N level and no fed rule either it's impossible to flag the C level for calculation since all of the N level below it is zero so the engine thinks there is no work to do at the C level.

When you change the rule to apply at all levels within the cube (by removing the C) you now have a rule that is fed and evaluates to a non-zero value, this means that the C level above it is flagged for calculation and everything starts working.

Some other tips

Take care with C level rules, they generally are not a good idea and are usually an indication that the design is not quite right.

Make use of attributes to generalise your rules, all the rules you have written can be written in one go like this

['SOH - Balance'] =
(['SOH - Movement','Period':'No Month','Day':'00'])+

#(['SOH - Movement','Apr YTD', 'Full Month']])+(['SOH - Movement','Apr YTD', 'Full Month']
DB('YourCube' , !dimrefs , 'SOH - Movement' , Attrs( 'Day' , !Day, 'PriorPeriod YTD) , !Dimrefs) +

#(['SOH - Movement','Apr']),
['SOH - Movement];

Note that the If test "!Measure @= 'SOH - Balance'" is redundant as it is specified on the left hand side of the rule, so within the scope of the rule Measure is always SOH - Balance.

HTH

Re: Rules based Values not showing in EV - Feeder Problem?

Posted: Thu Jun 04, 2009 11:03 pm
by damientaylorcreata
Hi Steve,

Thankyou so much for you advice. I was hoping somebody would be able to suggest a more efficient way of writing the rules! If I can get this to work, my rules will be much more maintainable. And yes, I have removed the C: from each of the rules and it works perfectly in EV now.

Thankyou so much for taking the time to help me out!

Damien