Show a different value for a certain element

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

    • Show a different value for a certain element


      my problem is the following:

      I cannot find a way to define a Business Rule that replaces a certain element with another one.

      When I query the value for US (ISO country code), I would instead like to query US-X
      I tried to solve that with rules.

      You may think "why not providing US-X direclty?". It is a Combo Box in a web report that provides the values (via a variable @country). In most of the cases the country that you choose by that combo box is ok. But there is one certain case in which the chosen value should be another one (but for just one certain value/measure).
      Therefore I would like to stick to the @country-variable for all, but would like to replace this one special selection with another one.
      I know I could do this on the Palo Web-sheet, but the outgoing value, is further used in other calculations (rules).

      What I tried:
      I tried to make a rule that assignes the value/measure to the other element: ['Measure', 'Factory':'US'] = ['Measure', 'Factory':'US-X'] But this obviously does not work because it is a circular reference.

      I have tried to do quite the same but in a different way by including an IF statement ['Measure'] = IF((!'Factory') == "US", PALO.DATA(..., "US-X", ... ,"Measure"), PALO.DATA(..., !'Factory', ... ,"Measure" )), but this gives the same error.

      Does someone have any idea?
    • That sounds like a good idea.
      Thanks so far.

      In the meantime I have found another possibility:
      I made a new consolidated Measure that holds the original one as a child. By this I was able to avoid the circular reference. Because I can now say "the new (consolidated) measure is equal to the original one but instead of country1 take country2. in all other cases the new measure is just like the old one"
      ["Measure_new","country1"] = C:["Measure_old","country2"]
      (no need to define a rule for all other cases)
    • Are there any reasons to have this parent-child relation between US-X and US. In OLAP only N elements can hold actual data. C elements just aggregates these N element values. Therefore US-X and US would be identical (suppose US-X has only one child). If you want to switch between two values based on context (Measure in this case) you would have to either change US-X to be N element or define additional N element - US-aux of type N. Anyway, best would be to draw 2x2 matrix (US,US-X)x(Measure,others) and put numbers in it you want to store/fetch from the cube.