if, compare null

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

    • if, compare null

      hello all,

      i have two problems with a business rule. what i want to do is: if there is no value entered in february, take the value of january and write it to february, else take users input (0 as input shall be possible, only null-values must be overwritten)

      first of all is it possible to check palodata for null (not 0)?
      the second problem is that i can't check and overwrite the value of the same datafield (this returns #null!. the rule works if i check the value of march and write values into february)

      at the moment the rule looks like this:
      ['07','Feb','K2','P2','Fr'] = IF( eq(['07','Feb','K2','P2','Frd'],0), PALO.DATA("TestBasis","ZuordnungKunden","07","Jan","K2","P2","Fr"), STET())
      it should be something like that: Feb = if(eq(Feb; null); then Jan; else user-input)

      (if possible i'd like to avoid extra datafields for input whether the value should be overwritten or not. i saw this in another thread, but that would cause a lot of input to the user)

      thanks for your help
    • I THINK I am right in saying that Palo will not distinguish between Null and 0 but someone from Jedox will probably be along shortly to tell me I'm wrong :P

      You cant test a value for Feb and write to the same value as that would effectively be a circular calculation similar to saying in Excel that A2 = A1 + A2
      Best wishes

      John Hobson
      The Planning Factory, Lytham, UK
    • hi pommie,
      thanks a lot for your answer!

      well, i fear that i can't solve this 0 / null problem without additional datafields :(

      at least i found another solution for the problem, that you can't compare and write the same datafield in one business rule without additional datafields. but i'm not really happy with it, as i wanted to put the calculation into the model.

      my solution is to put this formula into an excel sheet (for all values of the cube perhaps into a Makro):
      =IF(PALO.DATA("zentralPC/TestBasis"; "Zuordnung";"07";"Feb";"K2";"P5";"Fr")=0; PALO.SETDATA(PALO.DATA("zentralPC/TestBasis"; "Zuordnung";"07";"Jan";"K2";"P5";"Fr");FALSCH;"zentralPC/TestBasis"; "Zuordnung";"07";"Feb";"K2";"P5";"Fr"); FALSCH)

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

    • i have to add one thing to my solution: it seems that the sheet needs some more calculation-circles to be calculated/displayed right if i use that formula.

      if you enter data into the - in my example - feb-field, that is not 0 excel performs 2 calculation circles (have some coffee ;)) and everything is displayed right.

      if you enter 0, those 2 calculation circles are performed, too. but afterwards in the feb-field there will still be 0 as value - whereas consolidated elements are already displayed with jan-value. so what you need to do is to start one more calculation-circle (manually or by entering other data) and then the displayed feb-value will change.