1 Reply Latest reply on Oct 17, 2016 12:55 PM by Kaz Shakir

    help framing an expression

    archana.chandra

      I have a filter which has two values : A & B

       

      my requirement is if I select option A I should see output of Expression A ( which is simple count( ) )  and when user selects B from filter , it should show Expression B, which  is in percentage . I did created both expressions separately and set expression B  as percentage but when I'm calling both expressions in final expressions . I am not seeing % symbol for it . how can I achieve this requirement .

       

       

      my Expression is like :

       

       

      if  VarSelectedValue = 'A '

      then count(<field>)

      elseif

      VarSelectedValue='B'

      then  < this is my calculated Expression for percentage >

      END

        • 1. Re: help framing an expression
          Kaz Shakir

          You could convert the results to strings rather numbers.  For example, your expression might change to something like this:

           

          if  VarSelectedValue = 'A '

          then STR(count(<field>))

          elseif

          VarSelectedValue='B'

          then  STR(< this is my calculated Expression for percentage >*100)+"%"

          END

           

          This will no longer be a measure, so it might not work for your application.

          Will that accomplish what you need?