Rules with attributes

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

    • Rules with attributes

      Hello,

      I've a problem with my rules concerning the attributes. I'd like to calculate the sales volume = turnover/ price per unit, whereas the price per unit is the attribute. My rule:

      ['Absatz (Colli)'] = ['Umsatz'] / PALO.DATA("LogContrCube", "#_Artikel Kriterium 2", "Kosten (Artikel)", !'Artikel Kriterium 2')

      But the problem is, that Palo calculates: Turnover/ sum of all prices
      and not for article 1: Turnover /price "article 1"
      article 2: Trunover/ price "article 2" and so on.

      Any ideas, to solve this?

      Thanks,

      Wiebke
    • Hi,

      I think you have to specify that the calculation must be at leaf level, excluding consolidate elements from it.

      To do so, try to modify your rule as follows (please note the "N:" after the equal sign):

      ['Absatz (Colli)'] =N: ['Umsatz'] / PALO.DATA("LogContrCube", "#_Artikel Kriterium 2", "Kosten (Artikel)", !'Artikel Kriterium 2')

      This way, the number of packages will be calculated at leaf level, while at consolidated level you should see the sum of the packages of all the children of the consolidated element.

      Hope this helps,

      regards,

      RQ

      The post was edited 1 time, last by realquo ().

    • Hi,

      mmh.. 2 minutes it's quite long time, according to the user point of view... I suggest to try to set some markers on your rule (a marker "tells" to the engine to perform the calculation only for cells that have values stored, this reducing the effort in case your cube is quite sparse).
      I think this should help (please note the double squared bracket for [['Umsatz']] :(

      ['Absatz (Colli)'] =N: [['Umsatz']] / PALO.DATA("LogContrCube", "#_Artikel Kriterium 2", "Kosten (Artikel)", !'Artikel Kriterium 2')

      This way, the calculation will be performed only for the Umsatz that have not null values. I wouldn't put a marker on your attribute cube in this case because I assume that you always have the price for each article.

      Best regards,

      RQ