Page 1 of 1

Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 8:20 am
by AnonimusMax
Hi,

I have 2 cubes with the following structure:
Cube 1:
Dimensions: Year, Month, BusinessLine, ProductType, Stage, Measures

Cube2:
Dimensions: Year, YearTo, Month, MonthTo, BusinessLine, ProductType, Stage, Measures

Rules in Cube 2:
SKIPCHECK;
['Measure']=N:DB('Cube 1',!Year,!Month,!BusinessLine,!ProductType,!Stage,'Measure');
FEEDERS;

Feeders from Cube 1 to Cube 2:

['Measure']=>DB('Cube2',!Year,'2015',!Month, '1',!BusinessLine,!ProductType,!Stage,'Measure');
['Measure']=>DB('Cube2',!Year,'2015',!Month, '2',!BusinessLine,!ProductType,!Stage,'Measure');
..............................................................................................
['Measure']=>DB('Cube2',!Year,'2015',!Month, '12',!BusinessLine,!ProductType,!Stage,'Measure');
['Measure']=>DB('Cube2',!Year,'2016',!Month, '1',!BusinessLine,!ProductType,!Stage,'Measure');
..............................................................................................
['Measure']=>DB('Cube2',!Year,'2016',!Month, '12',!BusinessLine,!ProductType,!Stage,'Measure');

I have tried to write the feeders from Cube 1 to Cube 2 as:

['Measure']=>DB('Cube2',!Year,{'2015', '2016'},!Month,{'1','2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'},!BusinessLine,!ProductType,!Stage,'Measure');

but I received the error: "Sintax error on or before: "{'2015', '20 invalid string expression" "

I have also tried to put the dimension before, but was the same error:
['Measure']=>DB('Cube2',!Year,YearTo:{'2015', '2016'},!Month,{'1','2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'},!BusinessLine,!ProductType,!Stage,'Measure');

Any solutions?

Re: Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 8:37 am
by Wim Gielis
That's an easy one.

{ } is supported on the left hand side of the feeder or rule, but not on the right hand side.

Either duplicate it, either feed a consolidated element grouping those 12 elements.

Re: Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 8:58 am
by AnonimusMax
Thank you for the fast reply.

I already did it with the consolidated element. But let s say i don t want to feed all the years that i have, and i only want 2015,2016. in the all element i have all the years.
So it s not possible to select only a range? or only 2-3 values like in the left side?

Thank you :)

Re: Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 11:16 am
by Wim Gielis
No.

Duplicate your feeder rule for 2 years.
Or create a consolidation with 2015 and 2016 and feed that consolidation. That is the best solution because probably next year you will update the years. Then you only change the children and reprocess the feeders.

Re: Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 11:46 am
by AnonimusMax
ok,

Thank you for fast reply :) i will do that

Re: Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 2:41 pm
by lotsaram
Wim Gielis wrote:{ } is supported on the left hand side of the feeder or rule, but not on the right hand side.
Yes but there is another "hardcoded array notation" for feeders which is supported on the right hand side of a rule. You can just separate the items you want to feed with a comma.
e.g.
[A] => , [C], [D];
or
[A] => , DB(), DB(), ...

But I agree that rather than hardcoding it would be better to create a "technical consolidation" in the Year dimension e.g. "Years to Feed" with children 2015 & 2016. The consolidation can then be changed and can run reprocess feeders without having to edit the rule.

Re: Feeders Problem ( Range )

Posted: Tue Apr 18, 2017 5:14 pm
by Wim Gielis
lotsaram wrote:
Wim Gielis wrote:{ } is supported on the left hand side of the feeder or rule, but not on the right hand side.
Yes but there is another "hardcoded array notation" for feeders which is supported on the right hand side of a rule. You can just separate the items you want to feed with a comma.
e.g.
[A] => , [C], [D];
or
[A] => , DB(), DB(), ....


You are right.
It's good to have the various ways summarized in this topic.