Cyle in rule

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

    • Cyle in rule

      Hello
      How can I compare the values ​​in the two cubes in two different dimensions.
      The algorithm is as follows: in the first dimension, I am taking the first element and compare the value with the values ​​at the intersection of all elements in the second dimension, and then take the second value from the first measure and compare again with all the values ​​from the second dimension

      Not a very clear description, but in short, to get the result, I use 10 of these rules (because of the number of elements in the measurement of "1-10"), and I would like to make one, because in reality, the number of elements will be much greater.


      The rules is next:
      ['JobValueF'] = IF(PALO.DATA("_122_", "OperXJobs_Cube", !'1-10', "JobName") == PALO.DATA("_122_", "jobsDets", "1", "JobName"), PALO.DATA("_122_", "jobsDets", "1", "JobValue"), CONTINUE())
      ['JobValueF'] = IF(PALO.DATA("_122_", "OperXJobs_Cube", !'1-10', "JobName") == PALO.DATA("_122_", "jobsDets", "2", "JobName"), PALO.DATA("_122_", "jobsDets", "2", "JobValue"), CONTINUE())
      ['JobValueF'] = IF(PALO.DATA("_122_", "OperXJobs_Cube", !'1-10', "JobName") == PALO.DATA("_122_", "jobsDets", "3", "JobName"), PALO.DATA("_122_", "jobsDets", "3", "JobValue"), CONTINUE())
      .
      .
      .


      I think it's something like a cycle that must be placed in the specified location

      ['JobValueF'] = IF(PALO.DATA("_122_", "OperXJobs_Cube", !'1-10', "JobName") == PALO.DATA("_122_", "jobsDets", CYCLE, "JobName"), PALO.DATA("_122_", "jobsDets", CYCLE, "JobValue"), CONTINUE())
    • Hi Vasily,

      I'm developing the palo rules engine. Loop support in rules is missing and is not planned for next version.
      As I understood your problem, you need to get one of JobValue values from cube jobsDets. In your case for elements 1,2,3...,10 in first dimension into area [*,JobValueF] (not sure from what cube, I suppose from OperXJobs_Cube). Only variable here is !'1-10' (the coordinate within dimension "1-10"). It looks like you are mapping each element of dimension "1-10" into another element of the same or similar dimension. Right?

      In this case you can define an attribute (e.g. "mapping") for dimension "1-10", fill the attribute cube and use it for mapping.

      ['JobValueF'] = PALO.DATA("_122_", "jobsDets", PALO.DATA("_122_","#_1-10","mapping",!'1-10'), "JobValue")
      should do what you need

      Jiri