I am in the process of writing one or (potentially) multiple TI processes to replace an Allocation Spreadsheet. The spreadsheet performs A divided by B calculations for specific channels and pushes the results into a separate cube. I am able to complete those calculations without any issues. However, in the Excel document there is a catch-all calculation that performs: =IF(SUM(D21:M21)<>0,1-SUM(D21:M21),0). The catch-all formula is proving to be a bit of a head-scratcher.
I wrote the code below to take "One minus the Control Total of the Core Business product line", then push that plug number back to an OTHER product line category. So, if the sub-total of the remaining allocation lines total 0.95 (95%) then I would expect 0.05 (5%) to fall under the OTHER product line.
Code: Select all
if( sProdAllocLine @= 'OTHER' );
OTHERPCT = (1- (CellGetN( 'PRODUCT LINE ALLOCATIONS - MAIN', vPERIOD, 'CORE BUSINESS', 'CONTROL TOTAL')));
CELLPUTN(OTHERPCT, 'Product line Allocations - Main', vPERIOD , 'Core Business', 'OTHER');
ELSE;
CELLPUTN(WWCOREBUSINESSPCT, 'Product line Allocations - Main', vPERIOD, 'Core Business', sProdAllocLine);
endif;
Thank you!
Michael