Page 1 of 1

Different rules for same element in different hierarchies

Posted: Thu Oct 03, 2019 8:22 pm
by luizg2019
Hi!

I'm having trouble with rules for same element in different hierarchies.

I have two hierarchies: 'Plano de Contas' (default hierarchy) and 'DRE1' which was created by me.

These are the rules:
['Plano de Contas':'Plano de Contas':'1110290002'] = DB('GBL_PC', !Centros de Custo, !Versões, !Anos, !Meses, !Moedas, 'Plano de Contas':'111019');
['Plano de Contas':'DRE1':'1110290002'] = DB('GBL_PC', !Centros de Custo, !Versões, !Anos, !Meses, !Moedas, 'DRE1':'111019');

Instead of each hierarchy having separated rules, the rule is bringing the value from the default hierarchy to both hierarchies.
I tried using [] for the right side instead of a DB but I got the same result.

Here is the default hierarchy:
Image

And this is the other hierarchy:
Image


Does anyone know what is wrong? Any help is appreciated.
Thank you!

Re: Different rules for same element in different hierarchies

Posted: Fri Oct 04, 2019 10:47 am
by jim wood
C level rule, if statements and elisanc. That's the way I'd go about it.

Re: Different rules for same element in different hierarchies

Posted: Fri Oct 04, 2019 12:52 pm
by Steve Rowe
I don't think what you want to do is possible, the N level of a cube is common for all hierarchies.

C levels are different, same named C level members in different hierarchies are distinct members.

Re: Different rules for same element in different hierarchies

Posted: Fri Oct 04, 2019 1:14 pm
by jim wood
Steve Rowe wrote: Fri Oct 04, 2019 12:52 pm I don't think what you want to do is possible, the N level of a cube is common for all hierarchies.

C levels are different, same named C level members in different hierarchies are distinct members.
The moral of that story is don't try and answer questions at 6.30 in the morning. :oops: You are of course right Steve. The only alternative would be to have 2 elements of similar name in the 2 different hierarchies, after all if they need different values they are not the same thing. What I said would still apply but to only elements of level 1 or greater,

Jim.

Re: Different rules for same element in different hierarchies

Posted: Fri Oct 04, 2019 3:26 pm
by Steve Rowe
:lol: My golden rule, never answer a forum post before two cups of coffee!

Re: Different rules for same element in different hierarchies

Posted: Fri Oct 04, 2019 9:26 pm
by Wim Gielis
Steve Rowe wrote: Fri Oct 04, 2019 3:26 pm :lol: My golden rule, never answer a forum post before two cups of coffee!
Well, goodbye then.
I hate coffee and will never drink it.
Even if it means leaving the forum :lol:

Re: Different rules for same element in different hierarchies

Posted: Mon Oct 07, 2019 12:00 pm
by jim wood
Wim Gielis wrote: Fri Oct 04, 2019 9:26 pm
Steve Rowe wrote: Fri Oct 04, 2019 3:26 pm :lol: My golden rule, never answer a forum post before two cups of coffee!
Well, goodbye then.
I hate coffee and will never drink it.
Even if it means leaving the forum :lol:
I can't stand it either. That may be the reason why my answers make no sense?