target in the rule

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

    • target in the rule

      Hi,
      i have a problem with the implementation of two particular rules.
      The code is the follow

      the first

      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF'] = N:['CONS'] * [['STAGE','ANNO','2009','IMPACC','IWKS','NOOBIETT','S0000','E','NOCOAN']]


      the second

      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF'] = N:['CONS'] * [['STAGE','ANNO','2009','IMPACC','IWKS','NOOBIETT','S0000','S','NOCOAN']]

      The elements 'E' and 'S' are the first children of a dimension CONTO but if i activate the two rules it calculate only the first for all the CONTO's children.
      If i activate only the first it calculate correctly the children of element E and if
      i activate only the second it calculate correctly the children of S.
      How i can calculate the elements E (with its children )
      and S (with its children ) at same time?

      It's possible specify one element and its children (like !'dimension') in the target of rule?

      Tanks
    • RE: target in the rule

      Hi,

      The rules are evaluated from first to last. The first rule that applies to a certain area will be calculated. Following rules for the same area are ignored.
      I don't know your exact cube structure, but I guess the solution will be that the two (now identical) rule areas will be made explicit for the area they apply to (maybe by using 'E' and 'S' in the rule area?).

      Michel
    • RE: target in the rule

      At a first glance I would say, the target is identical in both of the rules, only the source is different. I believe both rules are executed, and the one that runs second wins.

      I believe you must make the distinction in the first part of the rules.

      Regards
      Holger
    • ok micheal,
      but i can't write

      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF',!'E'] = N:['CONS'] * [['STAGE','ANNO','2009','IMPACC','IWKS','NOOBIETT','S0000','E','NOCOAN']]

      and


      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF',!'S'] = N:['CONS'] * [['STAGE','ANNO','2009','IMPACC','IWKS','NOOBIETT','S0000','S','NOCOAN']]

      to write my data to the children of E and S.

      Some ideas?

      Tnx

      Andrea
    • Hi Andrea,

      What does your cube (or cubes?) structure look like?
      If 'E' is an element in a dimension in the target cube you can simply use
      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF','E'] and
      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF','S'] as your target areas (so without the exclamation marks).

      Some additional remarks on your rules:
      1. The target area is quite detailed - you could end up writing lots of rules. There are ways of writing more general rules, f.i. by using attributes.
      2. If you specify f.i. '2009' and 'IMPACC' in the target area of the rule it is not strictly needed to also specify this in the formula part of the rule (this is implicit). So
      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF','E'] = N:
      ['CONS'] * [['STAGE','ANNO','IWKS','S0000','NOCOAN']]
      would be the same as
      ['2009','IMPACC','ILOAD','NOOBIETT','WHIF','E'] = N:
      ['CONS'] * [['STAGE','ANNO','2009','IMPACC','IWKS','NOOBIETT','S0000','E','NOCOAN']]

      Michel