4 Replies Latest reply: Mar 10, 2015 7:17 AM by venkat nomula RSS

    Long expression with multiple ifs

    Anna Lopatenko

      Hello!

       

      I am trying to make my application calculate values but having an issue with getting the proper numbers(and it gets even worse when I select the calculated dimension).

       

      I am trying to utilize data from several tables like in the example below:

       

      Table1

      Field0(PK)

      Field1

      Field2

      Field4
      Field5

       

      Table2

      Field0(PK)

      Field3

       

      Table3

      Field0(PK)

      Field4

      Field5

       

      I need to have a formula similar to this:

       

      if(Field1=AAA and not(Match(Field2,'A',B','D')) and Field3<>5 and (Field5>Field5*0,32) ,’Right’, ‘Wrong’)


      Having multiple nested ifs like

      if(Field1=AAA, if(not(Match(Field2,'A',B','D')) , if(Field3<>5, if(Field5>Field5*0,32,’Right’, ‘Wrong’))))

      doesn't solve the problem and gives different result; and it is wrong.


      Currently I have this in my list box expressions but I suspect this is not the best way to do it. And later I am going to have more calculations like this so perhaps there should be netter formulas and better ways to organize the calculation process. Could anyone give any hints?