Page 1 of 1
Feeders help
Posted: Tue Aug 30, 2011 8:45 am
by ravi.ahuja21
Hi Guys,
I am new into TM1, I have an application for which I have to improve the performance. There are many cubes in the application but it is missing SKIPCHECK and FEEDERS
so I have decided to write FEEDERS, however I am getting unexpected results and I am not able to figure out what is wrong with respect to the code, If I can get a guidance as to where am I going wrong , that will be of great help. I have posted few codes below , I request someone to help me out here. Cheers
SKIPCHECK;
['Actual',{'Final','Version2'}] = ['Version1'];
['Actual PY',{'Final','Version2'}] = ['Version1'];
# Budget Calculation.
['Budget','YTD','Total Year'] = ['Budget','YTD','Mar'];
['Budget','YTD','Q1'] = ['Budget','YTD','Jun'];
['Budget','YTD','Q2'] = ['Budget','YTD','Sep'];
['Budget','YTD','Q3'] = ['Budget','YTD','Dec'];
['Budget','YTD','Q4'] = ['Budget','YTD','Mar'];
['Budget','YTD','Apr'] =['Budget','MTD','Apr'];
['Budget','YTD']= ['Budget','MTD']+DB('Bud_Others',!Entity BU,!Accounts,DB('}ElementAttributes_Period',!Period,'Prev'),'YTD',!Year,'Budget',!Version,!Currency,!Input);
# Actual Calculation.
['Actual','MTD','Total Year'] = ['Actual','YTD','Total Year'] ;
['Actual','MTD'] = if(['Actual','YTD'] =0,0,['Actual','YTD']-if(DB('}ElementAttributes_Period',!Period,'Prev') @= 'Mar',0,DB('Bud_Others',!Entity BU,!Accounts,DB('}ElementAttributes_Period',!Period,'Prev'),'YTD',!Year,'Actual',!Version,!Currency,!Input)));
['Actual'] = N:DB('GL BU',!Accounts,!Entity BU,!Period,!View,!Year,!Scenario,!Version,!Currency,!Input);
['Actual PY'] = N:DB('GL BU',!Accounts,!Entity BU,!Period,!View,!Year,!Scenario,!Version,!Currency,!Input);
FEEDERS;
['Version1'] => ['Actual','Version2'];
['Version1'] => ['Actual','Final'];
['Version1'] => ['Actual PY','Version2'];
['Version1'] => ['Actual PY','Final'];
# budget feeders
['Budget','YTD','Mar'] => ['Budget','YTD','Total Year'];
['Budget','YTD','Jun']=>['Budget','YTD','Q1'];
['Budget','YTD','Sep']=>['Budget','YTD','Q2'];
['Budget','YTD','Dec']=>['Budget','YTD','Q3'];
['Budget','YTD','Mar']=>['Budget','YTD','Q4'];
['Budget','MTD']=>['Budget','YTD'];
['Actual','YTD'] => ['Actual','MTD'];
This is the feeder for GL BU Cube
FEEDERS;
#FEEDERS FOR BUD_OTHERS STARTS HERE-----
['Actual']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual',!Version,!Currency,!Input);
['Actual PY']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual PY',!Version,!Currency,!Input);
#FEEDERS FOR BUD_OTHERS ENDS HERE-----
Thanks Ravi.
Re: Feeders help
Posted: Tue Aug 30, 2011 11:27 am
by dilip2012
you shuld be careful that left hand side and right hand side the number of dimensions shuld me same.then run the process
Re: Feeders help
Posted: Tue Aug 30, 2011 11:43 am
by ravi.ahuja21
Hi Dilip,
I did not got what you are trying to say, request you to please elaborate.
Re: Feeders help
Posted: Tue Aug 30, 2011 12:22 pm
by rozef
Ravi,
you must put N: after equal sign if you want the rule calculate on leaf elements or C: for consolidate elements, then your feeders can work.
Otherwise your rule will be applied on all level.
Cheers.
Re: Feeders help
Posted: Tue Aug 30, 2011 2:24 pm
by Christopher Kernahan
Ravi, maybe you could explain what sort of unexpected results you are getting. It would help in diagnosing the issue.
Re: Feeders help
Posted: Tue Aug 30, 2011 9:17 pm
by Martin Ryan
Hi Ravi, try this...
SKIPCHECK;
# Use N level unless there's a reason not to. E.g. percentages or averages
['Actual',{'Final','Version2'}] = N: ['Version1'];
['Actual PY',{'Final','Version2'}] = N: ['Version1'];
# Budget Calculation.
# Overriding a calculation, make it clear that it's at a C: level
['Budget','YTD','Total Year'] = C: ['Budget','YTD','Mar'];
['Budget','YTD','Q1'] = C: ['Budget','YTD','Jun'];
['Budget','YTD','Q2'] = C: ['Budget','YTD','Sep'];
['Budget','YTD','Q3'] = C: ['Budget','YTD','Dec'];
['Budget','YTD','Q4'] = C: ['Budget','YTD','Mar'];
['Budget','YTD','Apr'] =N: ['Budget','MTD','Apr'];
['Budget','YTD']=N: ['Budget','MTD']+DB('Bud_Others',!Entity BU,!Accounts,attrs('Period',!Period,'Prev'),'YTD',!Year,'Budget',!Version,!Currency,!Input);
# Actual Calculation.
['Actual','MTD','Total Year'] = C: ['Actual','YTD','Total Year'] ;
['Actual','MTD'] = N: if(['Actual','YTD']=0,0,['Actual','YTD']-if(attrs('Period',!Period,'Prev') @= 'Mar',0,DB('Bud_Others',!Entity BU,!Accounts,attrs('Period',!Period,'Prev'),'YTD',!Year,'Actual',!Version,!Currency,!Input)));
['Actual'] = N:DB('GL BU',!Accounts,!Entity BU,!Period,!View,!Year,!Scenario,!Version,!Currency,!Input);
['Actual PY'] = N:DB('GL BU',!Accounts,!Entity BU,!Period,!View,!Year,!Scenario,!Version,!Currency,!Input);
FEEDERS;
['Version1'] => ['Actual','Version2'];
['Version1'] => ['Actual','Final'];
['Version1'] => ['Actual PY','Version2'];
['Version1'] => ['Actual PY','Final'];
# budget feeders. None of these are required because they are consolidations, so will already be fed
# we are simply overriding the normal calculation
#['Budget','YTD','Mar'] => ['Budget','YTD','Total Year'];
#['Budget','YTD','Jun']=>['Budget','YTD','Q1'];
#['Budget','YTD','Sep']=>['Budget','YTD','Q2'];
#['Budget','YTD','Dec']=>['Budget','YTD','Q3'];
#['Budget','YTD','Mar']=>['Budget','YTD','Q4'];
['Budget','MTD']=>['Budget','YTD'];
['Actual','YTD'] => ['Actual','MTD'];
# These are the important ones that you're missing
['Budget', 'YTD']=>DB('Bud_Others',!Entity BU,!Accounts,attrs('Period',!Period,'Next'),'YTD',!Year,'Budget',!Version,!Currency,!Input);
['Actual', 'YTD']=>DB('Bud_Others',!Entity BU,!Accounts,attrs('Period',!Period,'Next'),'MTD',!Year,'Actual',!Version,!Currency,!Input);
This is the feeder for GL BU Cube
FEEDERS;
#FEEDERS FOR BUD_OTHERS STARTS HERE-----
['Actual']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual',!Version,!Currency,!Input);
['Actual PY']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual PY',!Version,!Currency,!Input);
#FEEDERS FOR BUD_OTHERS ENDS HERE-----
Re: Feeders help
Posted: Wed Aug 31, 2011 6:32 am
by ravi.ahuja21
Hi Martin,
Thanks for the help and all the tips.
However the problem persists when i right click a consolidated cell and check feeders all cells show the status as not fed.
Re: Feeders help
Posted: Wed Aug 31, 2011 7:12 am
by Gregor Koch
Not exactly sure which of your consolidations is not fed and it would be good if you could post the rules as you have them now.
If it is the consolidations that are on the numbers you are retrieving from the GL cube then is it maybe possible that your original feeders from the GL cube to Bud_Others are not working because the order of dimensions is incorrect?
If this part of one of your rules is working
DB('Bud_Others',!Entity BU,!Accounts,DB('}ElementAttributes_Period',!Period,'Prev'),'YTD',!Year,'Budget',!Version,!Currency,!Input);
then I think this Feeder cannot work
['Actual PY']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual PY',!Version,!Currency,!Input);
simply because !Accounts (from GL cube) is trying to feed a correlating element in the 'Entity BU' dimension in the Bud_Others cube.
Re: Feeders help
Posted: Wed Aug 31, 2011 10:41 am
by ravi.ahuja21
Hi so if i put the feeder in the GL Cube in this manner will it make sense? Because I have tried this still no result.
I have attached two copies of the cubes one is for the Production server and one for the server where I m doing the modification and comparing with the production server.
['Actual']=>DB('Bud_Others',!Entity BU,!Accounts,!Period,!View,!Year,'Actual',!Version,!Currency,!Input);
['Actual PY']=>DB('Bud_Others',!Entity BU,!Accounts,!Period,!View,!Year,'Actual PY',!Version,!Currency,!Input);
Re: Feeders help
Posted: Wed Aug 31, 2011 11:59 pm
by Gregor Koch
Hi
Yes, if the two lines you wrote above sit in the GL cube. It looks like the two cubes have the same dimensionality but the order is different.
Keep in mind that the error checking on the right side in feeders won’t tell you ‘hey, you are using the wrong order of dimensions’.
But the most likely reason why the [proc income] is not the same is because it looks like in production you still have the rule for both C: and N: level. And in this case having the screenshots from the two different servers doesn’t help figuring out what is wrong with the feeders in just one of the servers.
When I look at the first screenshot and the rules you have posted (again the latest version of both cube rules in development only would be helpful) I’d say that this rule should apply on the left column of it:
['Actual','MTD'] = N: if(['Actual','YTD']=0,0,['Actual','YTD']-if(attrs('Period',!Period,'Prev') @= 'Mar',0,DB('Bud_Others',!Entity BU,!Accounts,attrs('Period',!Period,'Prev'),'YTD',!Year,'Actual',!Version,!Currency,!Input)));
What strikes me apart from the feeders is that [Actual, YTD] is 0 (or “-“ so it could be formatting for that matter) and therefore MTD should be 0. So I am not sure which rules really apply at the moment.
Any ways, I suggest you focus on one rule and one feeder first.
I take it that [Actual, YTD, Version 1] comes from the GL cube. I this rule properly fed?
Re: Feeders help
Posted: Thu Sep 01, 2011 9:37 am
by ravi.ahuja21
Thanks for the valuable input.
Does it mean that I have to apply N: and C: to the production server and check with the development server.
Is is it necessary to have the dimension of both the cubes in the same order?
I know that my queries are very basic and looks like I am asking for spoon feeding but I am not able to figure out what is happening, The development was done by a technical expert in TM1 and I am just the beginner, I am extremely sorry for asking too many things at the same time.
I will try and figure out by looking one rule and a feeder at a time and revert back to you guys.
Re: Feeders help
Posted: Thu Sep 01, 2011 11:50 pm
by Gregor Koch
Without knowing more about your model I cannot tell you whether you have to use N: or C: or both, but please do understand that it won't make the Feeders work (your original problem).
Obviously, if the numbers in production are deemed to be correct you want to reconcile your development server to it, so you would have to leave prod as it is and play around with dev.
Personally I would have solved the MTD and YTD numbers a bit different but this would be leading to far.
The order of dimensions does not need to be the same. It only makes the rule writing easier and most cubes need a good re ordering every now and then any ways - not that this will require the re write of rules. While you are at it maybe do a search 'TM1, order of dimensions' and 'performance' and also read the IBM documentation on this.
e.g.
http://publib.boulder.ibm.com/infocente ... naCub.html
This is only one little bit among others to consider and only worry about it once you have sorted out your Feeding.
IMHO, somebody leaving you with a system that did/does not use Skipcheck and Feeders for the rules/cubes you are listing should not be called a TM1 Expert.
Re: Feeders help
Posted: Fri Sep 02, 2011 10:29 am
by ravi.ahuja21
Thanks Gregor
I feel that there is a problem with the feeder for this rule.
['Actual'] = N:DB('GL BU',!Accounts,!Entity BU,!Period,!View,!Year,'Actual',!Version,!Currency,!Input);
['Actual PY'] = N:DB('GL BU',!Accounts,!Entity BU,!Period,!View,!Year,'Actual PY',!Version,!Currency,!Input);
the value from GL BU cube is not getting pulled when i write a feeder.
the feeder for GL BU Cube is here.
['Actual']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual',!Version,!Currency,!Input);
['Actual PY']=>DB('Bud_Others',!Accounts,!Entity BU,!Period,!View,!Year,'Actual PY',!Version,!Currency,!Input);
Do i have to write SKIPCHECK if I am writing a feeder for a target cube in the Source cube, I have read that it is not required but still if someone can let me know if i am on the right direction.
Re: Feeders help
Posted: Mon Sep 05, 2011 3:40 am
by Gregor Koch
Hi
You don't have to use Skipcheck; in the source cube as it it is not necessary to make the Feeders (from this cube to another cube) work but I'd strongly recommend the use of it. Again, strongly.
If you don't zero suppress the view can you see numbers coming through on N-Level?
Please list the order of dimensions of the two cubes in question as they are displayed in Server Explorer. Else, see above already.