Page 1 of 1
Rules Sets
Posted: Tue Aug 18, 2015 2:17 am
by Yukiya
Hi all,
We have two cubes (Cube A and B).
Cube A contains D1, D2 and D3 dimensions and Cube B contains D4 which is combination of D1 and D2.
I need to build another cube (Cube C) and it contains D1, D2 and D4.
I tried to set [!D1, !D2, D4:DBRW(B, !D1,!D2)]=N:DB(A,!D1,!D2); in Rules Sets of Cube C, but I get Syntax error (invalid element name).
Do you have any idea to implement conditional rule set?
Regards,
Yukiya
Re: Rules Sets
Posted: Tue Aug 18, 2015 2:46 am
by Alan Kirk
Yukiya wrote:
We have two cubes (Cube A and B).
Cube A contains D1, D2 and D3 dimensions and Cube B contains D4 which is combination of D1 and D2.
I need to build another cube (Cube C) and it contains D1, D2 and D4.
I tried to set [!D1, !D2, D4:DBRW(B, !D1,!D2)]=N:DB(A,!D1,!D2); in Rules Sets of Cube C, but I get Syntax error (invalid element name).
Do you have any idea to implement conditional rule set?
A couple. The first is that DBRW is a worksheet function, not a rules function.
The second is that most companies don't name their cubes A and B, but hey, I could be wrong.
And the third one, the most important one, is
this one:
Request For Assistance Guidelines wrote:
5) For Rules and TurboIntegrator processes, posting the actual code and the real names of and structures of your cubes, dimensions and elements will be a thousand times more useful than an attempted description of them. You don't need to post real data, but the real code is needed. Pseudo code is obviously not "the real code". When you post something like "Suppose I have cube A and Cube B, and my rule is ['value'] = N:DB('CubeA', 'dim1, dim2'" etc, then three things happen. One, you reduce the chance that a syntax or typing error will be spotted, which means wasting time bouncing posts back and forth to try to get to the root of the problem. Two, you are usually describing what you think is happening, which may not be what is happening. Three, some more experienced members won't even look at the question because they've had too much time wasted by the first two issues in the past.
Re: Rules Sets
Posted: Tue Aug 18, 2015 3:15 am
by Yukiya
Hi Alan,
Thank you for your advice.
We have two cubes (one is Revenue and another is Combination).
Revenue contains Location, Product, Year and Month as dimension and Combination (this contains Location and Product as dimension) hold Entity.
I need to build another cube RevPerEntity and it contains Entity, Year and Month.
I tried to set [!Year, !Month, Entity:DB('Combination', !Location,!Product)]=N:DB('Revenue','All Location', 'All product',!Year,!Month); in Rules Sets of RevPerEntity, but I get Syntax error (invalid element name).
Do you have any idea to implement conditional rule set?
Thanks and Best Regards,
Yukiya
Re: Rules Sets
Posted: Tue Aug 18, 2015 8:46 am
by BariAbdul
Code: Select all
I tried to set [!Year, !Month, Entity:DB('Combination', !Location,!Product)]=N:DB('Revenue','All Location', 'All product',!Year,!Month); in Rules Sets of RevPerEntity, but I get Syntax error (invalid element name)
Obviously,DB notation and Bang(! notation) ,Both should be used at right hand side or formula definition.Area definition(left side) should only be defined the area or elements ,subset of elements that formula should be effected on.Thanks
Re: Rules Sets
Posted: Tue Aug 18, 2015 11:21 am
by lotsaram
What BariAbdul has told you is 100% correct. In the left hand side "area statement" of a rule only literal strings are accepted.
The !dimension notation is only required for full function references on the right hand side of a rule equation. It would be meaningless within the square brackets as the definition of !dimension is "not defined for this dimension" or "apply the same for all members of the dimension".
Re: Rules Sets
Posted: Thu Aug 20, 2015 1:37 am
by Yukiya
Hi all,
Thank you for your help, much appreciate.
Thanks and Best Regards,
Yukiya