Page 1 of 1

Send data based on 2 dimensions

Posted: Mon Dec 19, 2016 9:56 am
by Pierre06
Hi,
I have issues in sending data from 1 cube to another based on attributes.
To sum up, I have 2 cubes:
. Input Cube with "Productive days" per "site" / "month" and "version" (dimensions manually updated)
. Output Cube with the same above dimensions + a "cost center" dimension, the "site" dimension being an attribute of the cost center dimension.

I want to send these productive days to all the cost centers based on site.
To do so, I wrote the following TI rule, but I have the feeling I am missing the "cost center" element in the coding ...
As an example I tried using 1 single site, but I would rather write a "generic" formula to avoid having to copy it for each site...

['Staff Productive Days'] =
N: IF(ATTRS('2_Cost_Centers', !2_Cost_Centers, 'Site')@='MADRID',
DB('Input Cube', 'MADRID', !3_Month_Year, !4_Version_Final, 'Staff Productive Days', 'Value'),
CONTINUE);


Can you please help me sorting this out ?
Thanks in advance,
Pierre.

Re: Send data based on 2 dimensions

Posted: Mon Dec 19, 2016 12:12 pm
by pandinus
Try this:

Code: Select all

['Staff Productive Days'] = N: DB('Input Cube',ATTRS('2_Cost_Centers', !2_Cost_Centers, 'Site'), !3_Month_Year, !4_Version_Final, 'Staff Productive Days', 'Value');
This way you take input hours from the site as stated in the attributes of your cost center.

Re: Send data based on 2 dimensions

Posted: Mon Dec 19, 2016 4:10 pm
by Pierre06
Thanks for your help, it worked.