Page 1 of 1
Skip consolidated element during TI data loading
Posted: Fri Aug 20, 2010 7:58 am
by appleglaze28
I created a Excel template where I will be loading the same data for all element, how do I skip the consolidated element so I won't have any issues or error after the process was ran.
Code: Select all
i = DIMSIZ('base_customers_and_distributors');
while(i>1);
hierarchy = DIMNM('base_customers_and_distributors',i);
CellPutS(pDiscount,'CD_customer_setting',hierarchy,'Eligible for Forecast Accuracy Discount?');
CellPutN(pRate,'CD_customer_setting',hierarchy,'Preferred Discount');
i = i-1;
end;
Re: Skip consolidated element during TI data loading
Posted: Fri Aug 20, 2010 9:20 am
by asutcliffe
Can't you just check whether the cell is updateable before calling cellputn? It won't be if it's a consolidation.
http://publib.boulder.ibm.com/infocente ... eable.html
Re: Skip consolidated element during TI data loading
Posted: Fri Aug 20, 2010 11:05 am
by lotsaram
Better to simply skip over consolidations and not process them at all.
ViewExtractSkipCalcsSet(Cube, View, 1);
Re: Skip consolidated element during TI data loading
Posted: Fri Aug 20, 2010 1:26 pm
by appleglaze28
Code: Select all
i = DIMSIZ('base_customers_and_distributors');
while(i>1);
hierarchy = DIMNM('base_customers_and_distributors',i);
CellPutS(pDiscount,'CD_customer_setting',hierarchy,'Eligible for Forecast Accuracy Discount?');
CellPutN(pRate,'CD_customer_setting',hierarchy,'Preferred Discount');
i = i-1;
end;
ViewExtractSkipCalcsSet('CD_customer_setting', 'Customer Setting', 1);
I'm have this error log, can anyone help me out? The rules I have is just to average the value on the consolidated elements.
Error: Prolog procedure line (11): Rule applies to cell
Error: Prolog procedure line (11): error repeats 2 times
Re: Skip consolidated element during TI data loading
Posted: Sun Aug 22, 2010 12:09 am
by lotsaram
appleglaze28 - ViewExtractSkipCalcsSet applies to a VIEW as a data source. Obviously if your CellPutN is on the Prolog and you are doing a while loop through an entire dimension then ViewExtractSkipCalcsSet will have no effect on the records that are processed. To use this you would define a view in the CD_customer_setting cube, set this as the data source for your process and transfer the code (minus the while loop) to the data tab.
Alternately if you want to keep your code in the prolog you could either
1/ As already suggested use a CellIsUpdateable test to wrap your CellPut statements in. For example:
IF( CellIsUpdateable('CD_customer_setting',hierarchy,'Preferred Discount') = 1 );
CellPutN(pRate,'CD_customer_setting',hierarchy,'Preferred Discount');
ENDIF;
2/ loop through only N level elements of the base_customers_and_distributors dimension by looping through a subset of N elements rather than the entire dimension
This is pretty basic stuff.
You have been trying to do TM1 for quite some time now, but quite honestly my patience has run out. Until you take time to actually sit down and read through the manuals and maybe go and get yourself some proper training then I'm not sure that there's anything more I can do to help you.