Trouble with N: and C: rules
Posted: Thu Sep 29, 2011 8:54 pm
Hi All,
I am using TM1 version 9.1.2 and have AllowNandCrules (don't remember the exact syntax) in the config file. My problem is I'm trying to write a C and a N rule and then consolidated the two together.
['US Unallocated','Toll']=C:DB('P&L','actual','Total',!Co&cost,'Tolls',!amonth)*(DB('customer profitability',!amonth,'AAG US','actual','$US',!SHIPLET,'Loaded Miles (Disp)')\DB('customer profitability',!amonth,'AAG US','actual','$US','Customer Profitability','Loaded Miles (Disp)'));
['Toll'] = N:if(DB('Terminal Info','Exp Base',!Co&Cost)@='Hauled',DB('P&L','actual','Total',!Co&cost,'Tolls',!amonth)*['Pct of Hauled Loaded Miles'],DB('P&L','actual','Total',!Co&cost,'Tolls',!amonth)*['Pct of Dispatched Loaded Miles']));
The N level Co&Cost (company and cost center i.e. Terminal 1, Terminal 2) and the C US Unallocated calculation work fine. My problem is the consolidation of the the two does not work.
'US' is a consolidation of Terminal 1, Terminal 2, and US Unallocated (containing several leafs). The US consolidation ignores the amount in the Unallocated consolidation. I have to have the US Unallocated calculated at the consolidation level because the miles and $ are in different leafs so the N level formula brings back zeros.
Can anyone help with this?
I hope that makes sense.
Thanks,
Mark
I am using TM1 version 9.1.2 and have AllowNandCrules (don't remember the exact syntax) in the config file. My problem is I'm trying to write a C and a N rule and then consolidated the two together.
['US Unallocated','Toll']=C:DB('P&L','actual','Total',!Co&cost,'Tolls',!amonth)*(DB('customer profitability',!amonth,'AAG US','actual','$US',!SHIPLET,'Loaded Miles (Disp)')\DB('customer profitability',!amonth,'AAG US','actual','$US','Customer Profitability','Loaded Miles (Disp)'));
['Toll'] = N:if(DB('Terminal Info','Exp Base',!Co&Cost)@='Hauled',DB('P&L','actual','Total',!Co&cost,'Tolls',!amonth)*['Pct of Hauled Loaded Miles'],DB('P&L','actual','Total',!Co&cost,'Tolls',!amonth)*['Pct of Dispatched Loaded Miles']));
The N level Co&Cost (company and cost center i.e. Terminal 1, Terminal 2) and the C US Unallocated calculation work fine. My problem is the consolidation of the the two does not work.
'US' is a consolidation of Terminal 1, Terminal 2, and US Unallocated (containing several leafs). The US consolidation ignores the amount in the Unallocated consolidation. I have to have the US Unallocated calculated at the consolidation level because the miles and $ are in different leafs so the N level formula brings back zeros.
Can anyone help with this?
I hope that makes sense.
Thanks,
Mark