4 Replies Latest reply: May 22, 2012 9:02 AM by Syed Khaled Shahbaaz RSS

    If Condition in A Chart or Text Object!

    Syed Khaled Shahbaaz

      Hi,

       

      I am trying to use if condition in a straight table / text object to display images as follows:

       

      (value<40%), display green color

      (value>40%) and (value<70%), display yellow color

      (value > 70%), display red color

       

      The only problem is that it does not display red color, instead display only green and yellow color.

       

      I have used the following expression. Probably it needs some modification. Can somebody please suggest?

       

      =if((value<40),'qmem://<bundled>/BuiltIn/led_g.png',

               if((value>41)&(marks1<70),'qmem://<bundled>/BuiltIn/led_y.png',

                    'qmem://<bundled>/BuiltIn/led_r.png')

      )

       

       

      Regards & Thanks,

       

      - Khaled

        • If Condition in A Chart or Text Object!
          Supriya Thigale

          Hi Khaled,

           

          This expression is working  

           

          =if((marks1<40),'qmem://<bundled>/BuiltIn/led_g.png',if(((marks1>=41)and marks1<=70)),'qmem://<bundled>/BuiltIn/led_y.png','qmem://<bundled>/BuiltIn/led_r.png'))

           

           

           

          PLease try it and let me know

           

          Thanks.

          Sup

          • If Condition in A Chart or Text Object!
            Alexis Tan

            Hi,

             

            In your sample there are only marks1 70, 90, and 100

             

            and since this is your requirements:

            (value<40%), display green color

            (value>40%) and (value<70%), display yellow color

            (value > 70%), display red color

             

            then your display will always be red^^

             

            all you need to do is replace '&' from your expression to 'AND'

            like this,

            =if((value<40),'qmem://<bundled>/BuiltIn/led_g.png',

                     if((value>39) and (marks1<70),'qmem://<bundled>/BuiltIn/led_y.png',

                          'qmem://<bundled>/BuiltIn/led_r.png')

            )

             

             

            Regards,

            Alex