Previous Year Value rule

      Previous Year Value rule

      Hi,
      I wanted, in one of my projects, to have the vaklue of Sales in the same week of the previous year, using only one time dimension.
      I populated an attribute, called LY_Week, with the name of the week of the previous year, and vcreated the following rule:

      Source Code

      1. ['LY','Sales'] = B:PALO.DATA("localhost/Demo","Sales",PALO.DATA("localhost/Demo","#_Calendar","LY_Week",!'Calendar'),!'Product',!'Location',"Actual","Sales")

      The rule returns only zeros. I've checked the palo.data that fetches the name of the week in excel and web and it works; if I wrap it in the second palo.data, the formula returns error.

      Can anybody help me on this? Or is there another method that I don't know to obtain these values?

      Thanks,

      Lorenzo
      Hi Lorenzo,

      not sure what version you are using, but easiest debugging in this case is to simplify the rule to show only the reference element

      Source Code

      1. ['LY','Sales'] = B: PALO.DATA("localhost/Demo","#_Calendar","LY_Week",!'Calendar')



      and then browse base cells of the area you want to calculate, If you see in all cells correct nonempty element names, try to use one of these and freeze it in the rule

      Source Code

      1. ['LY','Sales'] = B:PALO.DATA("localhost/Demo","Sales","HARDCODED_ELEMENT_NAME",!'Product',!'Location',"Actual","Sales")


      if you see some values then there is a bug in palo and you should report it to jedox.

      Other option is to check palo.log for possible error messages.

      We are working on better calculation debugging tools.

      regards

      Jiri