Rule with condition on attribute

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

• Rule with condition on attribute

Hi everyone,

I have 2 cubes : one called 'PnL', one called 'XRates' for Euro conversion
On the PnL cube I have the following rule for 2010 conversion.
['at Actuals 2010'] = [['in Local Currency']] / PALO.DATA("Conso","XRates","Actuals",!'Currency',"2010",!'Period')

I have a dimension 'Accounts' in the 'PnL' cube only.

I would like to add the following to the upper rule :
If the attribute 'FXType' of the base element of the dimension 'Accounts' is equal to 'A', then,
take the amount 'in Local Currency' of the cube 'PnL' BUT with the dim 'Scenario'='Actuals' AND with the dim 'Year'='2010'
If not keep the simple rule above.

The idea is that for some P&L lines, if the year selected is 2012, instead of converting the 2012 data, the 2010 data is converted instead :
Therefore, the 2010 data and the 2012 data at 2010 rates will be of the same amount.

There may be also another method

Many thanks for your input, I can make simple rules like XRate calcultation but my expertise stopas at that level.
Best regards / Cordialement / Mit Freundliche Grüßen

Gérald Meunier
gerald.meunier@daliak.net
• Hi, without knowing your exact model setup it might be something like

['at Actuals 2010'] = [['in Local Currency']] / PALO.DATA("Conso","XRates","Actuals",!'Currency',"2010",!'Period')
['at Actuals 2011'] = [['in Local Currency']] / PALO.DATA("Conso","XRates","Actuals",!'Currency',"2011",!'Period')
['at Actuals 2012'] =
IF(PALO.DATA("Conso","#_accounts","FXType",!'accounts")=="A",['at
Actuals 2010'] , [['in Local Currency']] /
PALO.DATA("Conso","XRates","Actuals",!'Currency',"2012",!'Period'))

Consider restricting your rule to base elements?
Why are you adding the year to elements in your datatype dimension ['at Actuals 2012']? Thus you can't specify a general rule, but you have to specify rules for every year.

You will find examples in this forum with rules using attributes, e.g.
jedox.com/community/palo-forum…ghlight=balance#post14388
• Hi Kratzer,

Thanks for your reply, somehow I am not receiving notifications of the forum. I need to check that.

For the following question :
Why are you adding the year to elements in your datatype dimension ['at
Actuals 2012']? Thus you can't specify a general rule, but you have to
specify rules for every year.
That's completely true : the aim is to be able for example, to convert 2012 actuals at 2011 rates or at 2013 budget rates.
Using 1 element and 1 rule for each of these elements is the easiest I found out, knowing that we are talking about 3 rules a year.
If there is another solution, I will be pleased to read about it.

Consider restricting your rule to base elements?
I just moved from te CE edition to the jedox 4 version.
Somehow restricting to the base element was providing me with a wrong output, with Jedox 4, I had no choice but to restrict to base elements and it is working.

For my specific problem, with your help I finally managed to have the right rule working with the IF statement and the attribute check.

Many thanks !

Gerald
Best regards / Cordialement / Mit Freundliche Grüßen

Gérald Meunier
gerald.meunier@daliak.net
• Welcome,

[IMG:http://www.jedox.com/community/palo-forum/wcf/icon/quoteS.png] Citation

Why are you adding the year to elements in your datatype dimension ['at
Actuals 2012']? Thus you can't specify a general rule, but you have to
specify rules for every year.
That's completely true : the aim is to be able for example, to convert 2012 actuals at 2011 rates or at 2013 budget rates.
Using
1 element and 1 rule for each of these elements is the easiest I found
out, knowing that we are talking about 3 rules a year.
If there is another solution, I will be pleased to read about it.
If your model allows to use the datatype dimension from your FX-Cube (--> concept "shared dimensions") and supposing you have a year dimension in your P&L cube you may write a general rule like

['Actuals'] = [['in Local Currency']] / PALO.DATA("Conso","XRates","Actuals",!'Currency',!'Year',!'Period')

and ABOVE write your special rules (exceptions) already mentioned.
• In fact you can't do that :

What you will get is Actuals 2011 @ Actuals 2011, Actuals 2012 @ Actuals 2012, etc.
You will not get Actuals 2012 @ Actuals 2011 or Actuals 2012 @ Budget 2013
To tell the thruth, I am using that rule that I linked to an element called "at published rates"
Best regards / Cordialement / Mit Freundliche Grüßen

Gérald Meunier
gerald.meunier@daliak.net