Page 1 of 1

Consolidations with exceptions...

Posted: Thu Oct 09, 2014 7:26 am
by RJ!
Hi All,

We are trying to build in a Constant Dollar calculation into our GL Cube and have been having trouble getting it to calculate properly, mainly due to the way that TM1 is performing the consolidation formulas.

In our GL we have balances in multiple currencies, we report our expenses in AUD$ (and convert all other FX to AUD$) for local reporting but for our Global requirements we need to report as USD$. So that we can get a better picture of what all the variances are we report with a Constant Dollar so that FX variance is removed.

The most basic calculation for the Constant Dollar is for each month, take the aggregate of "USD$ FX rate & Multiply by the number of days in the month" and divide by the Total Days YTD. We are able to get this calculating at the Leaf Level as it's simply the AUD$ * a Constant$ Rate. For simplicity we just load the Monthly, QTR & YTD rates into a Parameter cube & reference them there.

We would also assume that this would also work for period consolidations of QTR & YTD if it wasn't for the fact that we have "Exceptions" to consider...
In our GL we have GL's that are flagged as "USD$" even though the currency in the system is still AUD$, so we have set up an Account attribute called "USDC_Flag" to deal with this. So when you look at these accounts at the leaf level, the USDE & USDC amounts should be the same.

The problem we have is trying to get these "exceptions" to be calculated properly when the Consolidation is taking place. What we have determined is that for the leaf level, we are all good, the Rule works as expected. When these Exceptions are consolidated with Parents that don't have the "USDC_Flag" we lose the calculation for that Exception and the rule calculates as if the exception never existed.

Below is one attempt to get the Consolidation to work properly by tweaking the Leaf (note that LCYE=Local Currency, USDE=USD$ Equivalent)

Code: Select all


['USDC'] = N:
	# If the Account is NonFinancial, ignore for USDC calcs
	If( Attrs('Account', !Account, 'NonFinancial') @= 'Y',
		# Show as Local Currency
		['LCYE'],
		# If the Period element is a Consolidation...
		IF ( ELCOMPN ('Period', !Period) > 1,
			# And there are no special USDC flags or is $USD Currency Code
			IF (Attrs('Account', !Account, 'USDC_Flag') @<> 'Y' % !CurrencyCode @<> '840',
				# Check if the Period Element is a Quarter or not
				IF( Scan('Qtr',!Period)>0,
						# If a Quarter, use the Quarter Constant Dollar Rate
						['LCYE'] * DB('z_ctrl_measures', 'Constant Qtr','Range1'),
						# Else use the YTD Constant Dollar Rate
						['LCYE'] * DB('z_ctrl_measures', 'Constant YTD','Range1')
				),
                                                                # If so, use the USDE total
				['USDE']
			),
			# If period isn't a Consolidation...
			# Check if there are special USDC flags or is $USD Currency Code
			IF( Attrs('Account', !Account, 'USDC_Flag') @= 'Y' % !CurrencyCode@= '840',
					# If so, use the USDE total
					['USDE'] ,
					# If not, use the Monthly Constant Dollar
					['LCYE'] * DB('z_ctrl_measures', 'Constant Mth','Range1')
					)
		)
	);
Below is an old Consolidation Rule that had the issues as per above, the exceptions calculations were reomved:

Code: Select all


['USDC'] = C:
 If the Element is a consolidation
        IF ( ELCOMPN ('Period', !Period) > 1,
 If the USD Flag is Y or Currency Code is 840 or Account is NonFinancial, ignore the Cell
		    If( Attrs('Account', !Account, 'USDC_Flag') @= 'Y' % !CurrencyCode@= '840' % 
		    Attrs('Account', !Account, 'NonFinancial') @<> 'Y',
				['LCYE'],
 Else, take the Local Currency Amount
		       ['LCYE'] *
 If the Period is a Quarter use the Quarter Constant Dollar Rate
					IF( Scan('Qtr',!Period)>0,
 If yes, use the "Constant Qtr" rate from z_ctrl_measures cube
						DB('z_ctrl_measures', 'Constant Qtr','Range1'),
 Else assume that the period uses the YTD rate from z_ctrl_measures cube
						DB('z_ctrl_measures', 'Constant YTD','Range1')
						)
		),
 Else Ignore the Cell
		['LCYE']
       );

Has anyone tried similar?
We have the SeparateT&CRules turned on, not sure if that's part of the problem or not...

Thanks,
RJ

Re: Consolidations with exceptions...

Posted: Thu Oct 09, 2014 8:27 am
by deepakjain2020
Hi RJ,

Turnoff your SeperateN&C in cfg file and it may give you appropriate result.
AS you are writing rule pointing to N level elements.
I Hope there is no skip check enabled.

Regards,
Deepak Jain

Re: Consolidations with exceptions...

Posted: Tue Oct 14, 2014 12:49 am
by RJ!
Yes SkipCheck + Feedcheck is on.
I've just confirmed that we can't turn off the SeperateN&C parameter as we do have other rules that are relying on that.

The only other solution I can think of is to actually insert new Leaf level elements for all of the QTR & YTD's and have those reference the appropriate rates... Though that seems like a waste of resources on the server!

Re: Consolidations with exceptions...

Posted: Tue Oct 14, 2014 8:04 am
by rmackenzie
deepakjain2020 wrote:Turnoff your SeperateN&C in cfg file and it may give you appropriate result.
RJ! wrote:I've just confirmed that we can't turn off the SeperateN&C parameter as we do have other rules that are relying on that.
If you use the N: qualifier why do you expect that the rule will apply to consolidations? If you have to write rules applying to consolidations and are allowing for separate N: and C: level rules (as you state you have to) then you should use the C: level qualifier to apply a calculation to the consolidated datapoints. You don't really need the ELCOMP test where you are using C: and N: qualifiers.
deepakjain2020 wrote:I Hope there is no skip check enabled.
Unfortunately, this is not sensible advice. Your requirement is not related to whether the cube has SKIPCHECK on and you an attempt to solve the problem without SKIPCHECK will likely result in a performance nightmare.

Generally, you might look into some sort of 'published results' cube to store the results using the quarterly and YTD average FX rates - by the time you issue the reports the rates will be known and you don't need to have the calculation 'on' all the time; or do you?

Re: Consolidations with exceptions...

Posted: Tue Oct 28, 2014 4:46 am
by RJ!
I'm still working on this Constant Dollar function...

Just to clarify what the issue is a bit more:

If I have a March YTD consolidation, I want the Consolidation Rule to be able to reference a rate from a rate Cube and apply that same rate to all the Months in the Consolidation. So far when we apply our rules, Jan is using the Jan rate, Feb is using the Feb rate & so on, for the March YTD Consolidation, it should be using the March rate for all 3 months. When I look at the Jun YTD, it needs to apply the June rate against all of the months to June.

What I want to know is how do you get TM1 to be able to identify it is looking at March YTD and apply that rate to all nodes under it? From what I have observed is that it can't recognise an individual consoldiation element and apply a rule / calculation against it.

Hope that makes it a bit clearer!

Re: Consolidations with exceptions...

Posted: Tue Oct 28, 2014 6:54 am
by lotsaram
If you want one rate to apply to all months then you cannot calculate this with an N rule applying a per month rate and then consolidate amount across months. Rather you need a separate C rule for amount and multiply qty by the rate that should apply to all the months. It should be quite simple.

Note however that if the rate varies say by customer or some other variable that you won't be able to consolidate amount across that dimension on the month rollup without using the ConsolidateChildren function.

Re: Consolidations with exceptions...

Posted: Thu Nov 06, 2014 1:42 am
by RJ!
This is how we can calculate it manually:

Feb YTD s/be: $1,451M
($USD Balance Jan $579M / Feb YTD Weighted Ave Rate .885191) * YTD Constant$ Rate 0.9157 = $600M
($USD Balance Feb $824M / Feb YTD Weighted Ave Rate .885191) * YTD Constant$ Rate 0.9157 = $852M
$600M + $852M = $1,451M

Mar YTD s/be: ($18,685M)
($USD Balance Jan $579M / Mar YTD Weighted Ave Rate .898162) * YTD Constant$ Rate 0.9157 = $591M
($USD Balance Feb $824M / Mar YTD Weighted Ave Rate .898162) * YTD Constant$ Rate 0.9157 = $833M
($USD Balance Mar ($19,730M) / Mar YTD Weighted Ave Rate .898162) * YTD Constant$ Rate 0.9157 = ($20,116M)
$591M + $833M + ($20,116M) = ($18,685M)

Etc...

What we are actually seeing is
($USD Balance Jan $579M / Jan YTD Weighted Ave Rate .876150) * YTD Constant$ Rate 0.9157
($USD Balance Feb $824M / Feb YTD Weighted Ave Rate .885191) * YTD Constant$ Rate 0.9157