3 Replies Latest reply: Aug 18, 2011 12:16 PM by javortiz RSS

    Field Comparison and true results

    Leandro Duarte

      Dear colleagues,


      I'm trying to create one formula in the script to get the true results for a series



      I have in the database


      ProductComparison 1Comparison 2results


      I would like to have a formula where the results only show the true value in the series and don't consider the other.


      Could anybody help me to define the formula?


      Thanks in advance,

      Leandro Duarte

        • Field Comparison and true results

          I'm not completely clear on what you are trying to do, but I think you could try an if statement, leaving off the else part, then supress null values. 

          • Field Comparison and true results
            Stefan Wühl

            Hope I got what you want, I think I might have not really understood your issue (an example might help, then):


            =if(Comparison1=Comparison2, results)


            as expression?


            If zero values are suppressed in presentation tab, you will only see rows with Comparison1 equals Comparison2 (if Product, Comparison1 and Comparison2 are dimension, with above expression)




            • Re: Field Comparison and true results

              How about an "IF" statement.


              I dont know how yo get the number 2 in field results, but looks like if comparison 2 is >= comparison 1 Then results.


              If is that case I think It would be something like this


              If(Comparison 2 >= Comparison 1, 2,)      as   Results Flag



              then you have created a new field with just numbers 2 and blank spaces,  now you can use this field to make a new field


              len(Results Flag)           as  ResultsFlag2


              If(ResultsFlag2 =2, 2,Null())         as FinalResults Flag



              this new field has just the registres with just the values with number 2.



              I hope thats what you are looking for.