0 in child elements for a certain time range

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

    • 0 in child elements for a certain time range

      Hallo everyone,

      I am pretty new to Palo and therefore have a rule related case I cannot solve.

      I need the value 0 for certain elements, e.g. only for the years 2012 and 2013 (though the values in the cube are not really 0, of course). I tried an if-statement, but could not get it to work. Next try was to put the relevant elements (all months of 2012, 2013) in one consolidated element ('2012+2013'). But when I set up the rule for that element, I get only a 0 for the c-element (if I add B: the rule doesn't even work at all) and not the child elements.

      Here the formula I used: ['Years':'2012+2013','Products':'Stationary PC''s'] = B:0

      Ist there something wrong with the syntax? Would be great, if someone could help me out. Thanks in advance.
    • Hi,
      yest the syntax is wrong. Target of one rule can contain only one element for each dimension so far.

      You should create several rules in this exact order:
      ['Years':'2012','Products':'Stationary PC''s']=B:0
      ['Years':'2013','Products':'Stationary PC''s']=B:0
      ['Products':'Stationary PC''s'] = B: <any formula for other years>

      there is also possibility with the if statement, but I wouldn't recommend it. The solution above is much faster


    • Hi Jiri,

      Unfortunately, that doesn't work. The rule only works for the consolidated element, not for the child element.

      For following rules I get the results in the attachments:

      - ['Years':'2012','Products':'Stationary PC''s'] = 0 --> Result: Attachment "result2"

      - ['Years':'2012','Products':'Stationary PC''s'] = C:0 (same result as above)

      - ['Years':'2012','Products':'Stationary PC''s'] = B:0 --> Result: Attachment "result1"

      Any thoughts on that?
      • Result1.PNG

        5.42 kB, 545×89, viewed 342 times
      • Result2.PNG

        5.1 kB, 547×82, viewed 352 times

      The post was edited 3 times, last by BenniS ().

    • Well,

      please make sure that you do not use the same basis element name within one dimension.
      I changed Jan, Feb as Basiselements from 2012 into Q1-2012, Q2-2012. Same for 2013
      As a potential workaround you could use then:
      ['Years':'Q1-2012', 'Products':'Desktop L'] = 0
      ['Years':'Q2-2012', 'Products':'Desktop L'] = 0

      Using ['Years':'2012', 'Products':'Desktop L'] = B:0 didn't work for me either.
    • Ok. I got it.
      I didn't know the structure of time dimension before. The original syntax was ok.
      The palo consolidation works not level by level and not dimension by dimension but all consolidated elements in all dimensions are expanded to leafs - base descendants and then aggregated in one step. If you write a rule only to '2012' or '2013' the consolidation '2012+2013' will ignore it because '2012' is not base element and therefore it is ignored.
      So any rule targeted on consolidated element ('2012' in your case) that has ancestors in dimensional structure cannot be a B: rule - it means no prefix or C: prefix only and for each ancestor ('2012+2013' in your case) you have define rule too.
      Definition of rule on consolidated element ('2012') has no influence on values under the consolidation ('Jan', 'Feb', ...)

      I hope it helped