Page 1 of 1

Cube running very slow.

Posted: Tue Oct 18, 2011 7:46 pm
by karan2345
Hi Guys,

For my Sales Budgeting I have around 5 cubes which are broken to there own respective calculation and then I am using the % values of each these cubes for my Main Cube.
My Problem is my Main cube is not responding when i select all consolidations items in it. I am not able to figure out what is going wrong with the feeders or if I am overfeeding the Main cube. Request some one to help me on this as I am a newbie as far as feeders & overfeeding goes.

I have read the topics on this forum for overfeeding but I am not able to figure out what is going wrong in my rules.

It would be a great help if some one can throw light to this.

Code: Select all

1. Sales by Month
Year
Months
Facility.
Function
Sales Measures:(Actual Amount PY,Actual Amount % , Budgeted Amount, Budgeted %)
Rules:
SKIPCHECK;
FEEDERS;

['Budgeted Amount']=>DB('Sales by Customer Class',!Function,!Facility,!Year,'Total Markets','Budgeted Amount');
['Sales and selling expenses','Budgeted Amount %']=>DB('Sales',!Year,!Months,'Budgeted Amount');


2.Sales by Customer Class

Year
Cust Class
Facility.
Function
Sales Measures:(Actual Amount PY,Actual Amount % , Budgeted Amount, Budgeted %)

Rules:

SKIPCHECK;
['Budgeted Amount']=N:DB('Sales by Month',!Function,!Facility,!Year,'Total Months','Budgeted Amount')*(['Budgeted Amount %']/100);

FEEDERS;
['Budgeted Amount %']=>['Budgeted Amount']	;

['Budgeted Amount']=>DB('Sales Market by Cust Class',!Function,!Facility,!Year,!Market Segment,'Total Market','Budgeted Amount');

['Sales and selling expenses','Budgeted Amount %']=>DB('Sales',!Facility,!Year,'Total Months',!Market Segment,'Total Product Line','Total Market','Total Item Sales Group','Budgeted','Budgeted Amount');

3.Sales Market by Cust Class
Year
Cust Class
Market
Facility.
Function
Sales Measures:(Actual Amount PY,Actual Amount % , Budgeted Amount, Budgeted %,Actual Avg Price,Actual Pieces,Budgted Avg Price)

RUles:
SKIPCHECK;

['Budgeted Amount']=N:DB('Sales by Customer Class',!Function,!Facility,!Year,!Market Segment,'Budgeted Amount')*(['Budgeted Amount %']\100);

FEEDERS;
['Budgeted Amount %']=>['Budgeted Amount'];

['Budgeted Amount']=>DB('Sales Product Line by Market',!Function,!Facility,!Year,'Total Product Line',!Market,'Budgeted Amount');

['Sales and selling expenses','Budgeted Amount %']=>DB('Sales',!Facility,!Year,'Total Months',!Market Segment,'Total Product Line',!Market,'Total Item Sales Group','Budgeted','Budgeted Amount');

4.Sales Product Line by Market
Year
Product Line
Market
Facility.
Function
Sales Measures:(Actual Amount PY,Actual Amount % , Budgeted Amount, Budgeted %)

Rules:

SKIPCHECK;
['Budget Amount % for Product']=STET;

['Budgeted Amount']=N:DB('Sales Market by Cust Class',!Function,!Facility,!Year,'Total Market Segment',!Market,'Budgeted Amount')	* (['Budget Amount % for Product','Budgeted Amount %']\100);	

['Budgeted Amount %']=['Budget Amount % for Product','Budgeted Amount %'];


FeEDERS;
['Budget Amount % for Product','Budgeted Amount %']=>['Budgeted Amount'];
['Budget Amount % for Product','Budgeted Amount %']=>['Budgeted Amount %'];

['Budgeted Amount']=>DB('Sales Item Sales By Product Line',!Function,!Facility,!Year,'Total Item Sales Group',!Product Line,'Budgeted Amount');


['Sales and selling expenses','Budgeted Amount %']=>DB('Sales',!Facility,!Year,'Total Months','Total Market Segment',!Product Line,!Market,'Total Item Sales Group','Budgeted','Budgeted Amount');

5Sales Item Sales by Product Line


Year
Product Line
Item Sales Group
Facility.
Function
Sales Measures:(Actual Amount PY,Actual Amount % , Budgeted Amount, Budgeted %)

Rules:

SKIPCHECK;
['Budget Amount % for Item Sales Group','Budgeted Amount %']=STET;
['Budgeted Amount']=N:DB('Sales Product Line by Market',!Function,!Facility,!Year,!Product Line,'Total Market','Budgeted Amount')*(['Budget Amount % for Item Sales Group','Budgeted Amount %']\100);

['Budgeted Amount %']=['Budget Amount % for Item Sales Group','Budgeted Amount %'];

FEEDERS;

['Budget Amount % for Item Sales Group','Budgeted Amount %']=>['Budgeted Amount'];
['Budget Amount % for Item Sales Group','Budgeted Amount %']=>['Budgeted Amount %'];

['Sales and selling expenses','Budgeted Amount %']=>DB('Sales',!Facility,!Year,'Total Months','Total Market Segment',!Product Line,'Total Market',!Item Sales Group,'Budgeted','Budgeted Amount');






6. Sales Cube(This is the main cube)
Year
Months
Facility
Cust Class
Market
Product Line
Scenario (actual vs Budgeted)
Item Sales Group
Sales Measures:(Actual Amount PY,Actual Amount % , Budgeted Amount, Budgeted %,Actual Avg Price,Actual Pieces,Budgted Avg Price)

Rules:

SKIPCHECK;

['Budgeted Amount','Budgeted']=N:DB('Sales by Month','Sales and selling expenses',!Facility,!Year,!Months,'Budgeted Amount')*



(DB('Sales by Customer Class','Sales and selling expenses',!Facility,!Year,!Market Segment,'Budgeted Amount %')\100)
*(DB('Sales Market by Cust Class','Sales and selling expenses',!Facility,!Year,!Market Segment,!Market,'Budgeted Amount %')\100)*
(DB('Sales Product Line by Market','Sales and selling expenses',!Facility,!Year,!Product Line,!Market,'Budgeted Amount %')\100)
*(DB('Sales Item Sales By Product Line','Sales and selling expenses',!Facility,!Year,!Item Sales Group,!Product Line,'Budgeted Amount %')\100);




Re: Cube running very slow.

Posted: Tue Oct 18, 2011 11:54 pm
by tomok
There doesn't have to be something wrong with your rules or feeders for a cube to take a long time to calculate. Depending on the complexity of the calculations and/or size of the cube, it could be slow even when everything is done "right". Taking into account I don't know anything about the size of these cubes, based on the limited info given, having five "sub" cubes feeding one master cube, all with rules, is a recipe for performance issues, especially when you try to pull values at the top of the house in the main cube. I'm not saying it "can't" perform acceptably, just that it probably won't if these dimensions have any kind of size to them. Most experienced developers would not do a design like this unless it was absolutely required.

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 12:15 am
by karan2345
tomok wrote:Most experienced developers would not do a design like this unless it was absolutely required.

Hi Tom,

Yes, I tried to avoid it, but that's how the user wants, so I could not do much.

The cube size is not big as yet, It will grow once i pull in the actuals into this cube. Every Dimension is having an average of 20 element members.

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 12:43 am
by Gregor Koch
tomok beat me to it. I'd reconsider the design, especially if you personally are not able to feed it properly which, from a quick look, is possible but not that simple.
karan2345 wrote: I am not able to figure out what is going wrong with the feeders or if I am overfeeding the Main cube.
Simple answer, a lot, starting with feeding the Year dimension in the 'Sales by Customer' with/from !Function from the 'Sales by Month' - won't feed at all - and ending with using a whole lot of consolidations on the RHS of the feeder which leads to the other answer, yes, you are most likely overfeeding.

Have you listed the dimensions in order and do you realise why this is important for the rules/feeders?
Have you written these feeders yourself?
karan2345 wrote: Request some one to help me on this as I am a newbie as far as feeders & overfeeding goes.
Obviously requests for help and others providing it for free is what this forum is about but maybe also consider to 'request someone' (paid and/or the person who built the model) to help you with this on site.
I, for one, am a bit reluctant to give the whole solution on requests that basically read:
"I took over a model or tried to create one and although I am a complete novice have taken on the task to make it work, now do it for me."
karan2345 wrote: Yes, I tried to avoid it, but that's how the user wants, so I could not do much.
Wish I would get a buck every time someone writes this here as it seems to be one of the favourite excuses for building a model in a way that ... well, for shooting yourself in the foot.
What do you think enables a user to tell you which cube structure you should be using? Experience in designing a TM1 model?
If they, the users, have a better understanding of modelling in TM1 maybe they should write the feeders for your.
A requirement of "we need to be able to budget sales by month and also sales by customer class" does not mean that you as the developer have to create two cubes for it.

Just saying.

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 3:44 pm
by karan2345
Have you written these feeders yourself?
Yes, This has been written by me. The model has also been designed by me. I have not taken or copied any one else's model or design.
Obviously requests for help and others providing it for free is what this forum is about but maybe also consider to 'request someone' (paid and/or the person who built the model) to help you with this on site.
There is no other developer in the team, the model is built by me, It's just me and my colleague (the tech-functional guy) & both doing the TM1 project for the first time.
I, for one, am a bit reluctant to give the whole solution on requests that basically read:
"I took over a model or tried to create one and although I am a complete novice have taken on the task to make it work, now do it for me."
That's OK, If you cannot do that I will try and figure out what I can do.
A requirement of "we need to be able to budget sales by month and also sales by customer class" does not mean that you as the developer have to create two cubes for it.
I can understand that, but being a novice( I know you don't like me saying this but its a fact that I am completely new in this) I am not able to figure out how would I fit these 5 cubes in the design.


Thanks for the help Sir, sorry for any inconvenience caused.

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 5:34 pm
by tomok
After looking at your rules for a few minutes I can see that you are basically building up to the main cube such that Cube 1 calculates something that get's referenced to Cube 2, which calculates and references something to Cube 3, etc., all the way up to the main cube such that you have five levels of interdependency. Let me be blunt with you here. There is no way in HE!! you are going to be able to make this perform to the user's satisfcation. Just because you CAN technically do something in TM1 doesn't mean you SHOULD. You need to go back to the drawing board and redesign your model. If it was me I would either 1) figure out a way to build it all in one cube, through creative use of dimension design, or 2) transfer the data between cubes via TI.

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 10:46 pm
by Gregor Koch
karan2345 wrote: That's OK, If you cannot do that I will try and figure out what I can do.

I can understand that, but being a novice( I know you don't like me saying this but its a fact that I am completely new in this) I am not able to figure out how would I fit these 5 cubes in the design.

Thanks for the help Sir, sorry for any inconvenience caused.
The first thing is a big tease and I am tempted, also because tomok says it won't perform ;) , to work it out. Good luck with it.
Don't get me wrong, I don't have a problem with you being a novice at all. You just seem to ignore the advice you get, which is to reconsider the design.
You didn't cause any inconvenience, no harm done and none intended.

Cheers

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 11:08 pm
by karan2345
Gregor Koch wrote:
karan2345 wrote: That's OK, If you cannot do that I will try and figure out what I can do.

I can understand that, but being a novice( I know you don't like me saying this but its a fact that I am completely new in this) I am not able to figure out how would I fit these 5 cubes in the design.

Thanks for the help Sir, sorry for any inconvenience caused.
The first thing is a big tease and I am tempted, also because tomok says it won't perform ;) , to work it out. Good luck with it.
Don't get me wrong, I don't have a problem with you being a novice at all. You just seem to ignore the advice you get, which is to reconsider the design.
You didn't cause any inconvenience, no harm done and none intended.

Cheers

Hi Sir, I am not ignoring anyone's advice,
You Guys have been the only source of help for me and the only encouraging factor,

I am already helpless because of the expectation from a novice by my organisation & I felt the reply was a very demotivating one.

I am on my way to do everything using only 1 cube by using creative dimension.

I will share it with you guys once I complete it.


Thanks Everyone.!

Re: Cube running very slow.

Posted: Wed Oct 19, 2011 11:44 pm
by rmackenzie
A couple of things for your redesign:

* In the main cube ('Sales Cube' per your original post) you have a Scenario dimension, but in your Sales Measure dimension you have Actual Amount and Budgeted Amount. If you have the Scenario dimension, then you don't need to have both measures, you could just have Amount.

* You might find that when you are loading data into one big cube (per your new design) that some row in the data-set doesn't include a value, for example, for Facility. If you make sure that your dimensions have elements called 'No Facility', 'No Function', 'No Market', etc, then you can handle keeping these facts all in the same cube.

Re: Cube running very slow.

Posted: Thu Oct 20, 2011 12:18 am
by karan2345
rmackenzie wrote:A couple of things for your redesign:

* In the main cube ('Sales Cube' per your original post) you have a Scenario dimension, but in your Sales Measure dimension you have Actual Amount and Budgeted Amount. If you have the Scenario dimension, then you don't need to have both measures, you could just have Amount.

* You might find that when you are loading data into one big cube (per your new design) that some row in the data-set doesn't include a value, for example, for Facility. If you make sure that your dimensions have elements called 'No Facility', 'No Function', 'No Market', etc, then you can handle keeping these facts all in the same cube.
Thanks mackenzie, I will keep that in mind.

Re: Cube running very slow.

Posted: Thu Oct 20, 2011 2:02 pm
by karan2345
Hi Guys,

Firstly I would like to thank you all for your advice and suggestion, appreciate it whole heartedly.

I am done with the design for the cube. I have made it all in one cube, using creative dimension elements.

I Have added the following elements to the dimensions.
'Months' Dimension - Element - 'All Months'
'Market Segment' Dimension - Element - 'All Cust Class'
'Market' Dimension - Element - 'All Market'
'Product Line' Dimension - Element - 'All Product Line'
'Item Sales Group' Dimension - Element - 'All Item Sales Group'

Cube Sales:
Dimensions includes.
1.Facility.
2.Year
3. Months
4.Market Segment
5.Market
6.Product Line
7.Item Sales Group
8.Scenario
9.Sales Measures.


I have created 6 views of the cube.
Sales by Month
Sales by Cust Class
Sales Market by Cust class
Sales Product Line by Market
Sales Item Sales Group by Product line
Sales (main view)

The performance has improved considerably, However I still have problems writing feeders for my rules :cry:

Rules are used to derive
Sales by Cust Class ( Get the value from sales by Month cube and apply the % entered by the user to get the amount)
Sales Market by Cust class ( Get the value from sales by cust class cube and apply the % entered by the user to get the amount)
Sales Product Line by Market ( Get the value from Sales Market by Cust class cube and apply the % entered by the user to get the amount)

Sales Item Sales Group by Product line ( Get the value from Sales Product Line by Market cube and apply the % entered by the user to get the amount)
Sales (main view) ( Get the amount from Sales by Month cube and apply the % of all the rest of the views to get the amount at the granularity ignoring all the creative elements.)

The feeders gives problem as i start to check the values from
Sales Product Line by Market , Sales Item Sales Group by Product line, Sales (main view)

Here is my rule,

Code: Select all

SKIPCHECK;

#stet for month.		
['All Cust Class','All Product Line','All Market','All Item Sales Group','Budgeted','Amount %']=STET;


#stet for customer class.		

['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount %']=STET;

['All Cust Class','All Months','All Product Line','All Market','All Item Sales Group','Budgeted']=STET;


# stet for market by cust class
['All Months','All Product Line','All Item Sales Group','Budgeted','Amount %']=STET;


# stet for product line by market.

['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted']=STET;
#,'Budgeted Amount %']


# stet for item sales by product line

['All Months','All Cust Class','Budget Amount % for Item Sales Group','All Market','Budgeted']=STET;







# calculating customer class values....

['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']=N:

['All Cust Class','Total Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']*

(['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount %']\100);






# calculating market by cust class  values....

['All Months','All Product Line','All Item Sales Group','Budgeted','Amount']=N:

['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']
*(['All Months','All Product Line','All Item Sales Group','Budgeted','Amount %']\100);



# calculating Product by market 	values....

['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount']=N:	['All Months','Total Market Segment','All Item Sales Group','Budgeted','Amount','All Product Line']
*
(['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted','Amount %']\100);	



['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount %']=(['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted','Amount %']);	



#calculating item by product line..


['All Months','All Cust Class','All Market','Budgeted','Amount']=N:

	['All Months','All Cust Class','Total Market','All Item Sales Group','Budgeted','Amount']*
(['All Months','All Cust Class','Budget Amount % for Item Sales Group','All Market','Budgeted','Amount %']\100);

['All Months','All Cust Class','All Market','Budgeted','Amount %']=['All Months','All Cust Class','Budget Amount % for Item Sales Group','All Market','Budgeted','Amount %'];





['All Months']=STET;
['All Cust Class']=STET;
['All Product Line']=STET;
['All Market']=STET;
['All Item Sales Group']=STET;


	# calculating the entire cube.
['Budgeted','Amount']=
#GET aMOUNT	 sALES BY mONTH

N:['All Cust Class','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']
*
#GET a	 sALES BY CUST CLASS
(['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount %']\100)			

*

#GET % MARKET BY CUST CLASS
(['All Months','All Product Line','All Item Sales Group','Budgeted','Amount %']\100)

*
#GET % PRODUCT LINE BY MARKET

(['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount %']\100)				
#GET % ITEM BY PRODUCT LINE
* (['All Months','All Cust Class','All Market','Budgeted','Amount %']\100);



Feeders;

# feeders for 	calculating customer class values....
['All Cust Class','Total Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']=>['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount'];
['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount %']=>['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount'];


# feeders for 	market by customer class..								
	
['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']=>['All Months','All Product Line','All Item Sales Group','Budgeted','Amount'];

['All Months','All Product Line','All Item Sales Group','Budgeted','Amount %']	=>['All Months','All Product Line','All Item Sales Group','Budgeted','Amount'];

# feeders 			Product by market 	values....	

['All Months','Total Market Segment','All Item Sales Group','Budgeted','Amount','All Product Line']=>['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount'];



['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted','Amount %']=>['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount'];

# feeders 			Product by market 	values %....	


['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted','Amount %']=>['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount %'];


#feeders item by product line..	

['All Months','All Cust Class','Total Market','All Item Sales Group','Budgeted','Amount']=>['All Months','All Cust Class','All Market','Budgeted','Amount'];
		

['All Months','All Cust Class','Budget Amount % for Item Sales Group','All Market','Budgeted','Amount %']=>['All Months','All Cust Class','All Market','Budgeted','Amount'];

#feeders item by product line % calculation..	


['All Months','All Cust Class','Budget Amount % for Item Sales Group','All Market','Budgeted','Amount %']=>['All Months','All Cust Class','All Market','Budgeted','Amount %'];


	# feeders to calculating the entire cube.
['All Cust Class','All Product Line','All Market','All Item Sales Group','Budgeted','Amount']=>	['Budgeted','Amount'];
['All Months','All Product Line','All Market','All Item Sales Group','Budgeted','Amount %']=>	['Budgeted','Amount'];
['All Months','All Product Line','All Item Sales Group','Budgeted','Amount %']	=>	['Budgeted','Amount'];

['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount %']=>	['Budgeted','Amount'];


['All Months','All Cust Class','All Market','Budgeted','Amount %']=>	['Budgeted','Amount'];



I request some one to please help me on this.

Re: Cube running very slow.

Posted: Fri Oct 21, 2011 1:37 pm
by karan2345
I request someone to throw light on this.

Re: Cube running very slow.

Posted: Fri Oct 21, 2011 3:37 pm
by karan2345

Code: Select all

Rule:
# calculating Product by market 	values....
		
['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount']=

		N:	['All Months','Total Market Segment','All Item Sales Group','Budgeted','Amount','All  Product Line']
*
(['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted','Amount %']\100);	


Feeder:
#  Product by market 	values....

['All Months','Total Market Segment',
'All Item Sales Group','Budgeted','Amount','All  Product Line']=>
['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount'];

				
['All Months','All Cust Class','Budget Amount % for Product','All Item Sales Group','Budgeted','Amount %']=>
['All Months','All Cust Class','All Item Sales Group','Budgeted','Amount'];



Can some one tell me what is wrong with this feeder?

I am not able to figure out. Please help :(

Re: Cube running very slow.

Posted: Mon Oct 24, 2011 1:01 am
by karan2345
I request some one to please reply, I am sorry and apologize if my behavior was not good.

Please help.

Re: Cube running very slow.

Posted: Mon Oct 24, 2011 1:49 am
by rmackenzie
It's difficult from the information supplied to be able to trouble-shoot your problems. We'd need to be able to see dimension structures, data sets, example cube views, rule traces, etc. It's not clear why you've written some of the rules without using the N: qualifier and also you seem to be calculating cube areas at N: with element names that suggest they are consolidations. You probably have issues above and beyond a single feeder.

This forum is great, but only upto a certain point. You should investigate the possibility of calling in some outside, specialist help.