2 Replies Latest reply: May 24, 2012 5:24 AM by Supriya Thigale RSS

    formatting issues

      hi

       

      i am working on a report in which i am creating a pivot table. in the pivot table the dimension used is hardcoded means is being created using an inline

      . now in that table i am evaluating 12 different expressions as different columns and theses are like p1,p2.......p10.

       

      p11= p10-p9 .

       

      here i have to hanlde two situations.

      1) where value is negative it must be red

      2) instead of negative sign, () it must be used...for e.g  -22 should be displayed like (22)

       

      the other major challenge is for a particular row i have to show value upto two decimal places and for all others it must be an integer.

      i have been able to do it in the all colums except p11.

      i am using expression 

       

      if

       

      (((p1-p2)),'#.#'),p1-p2)
      and if(p2>p1,fabs(p1-p2))

       

       

      buts its nt wrking...plz help

        • formatting issues

          Hi,

           

          This expression works:

           

                        if(num2>num1,fabs(num1-num2),num(fabs(num1-num2),'(#.#0)'))

           

           

          for both ur conditions.

           

          Hope it helps

           

          Thanks,

          Sup

            • formatting issues

              Hi,

               

              Adding code to change the colour if value  is negative

               

              1.select expressions tab in properties of ur chart

              2. select the above expression given in my earlier post.
              2.click on the plus sign on the expression
              3. type the foll on Background color definition :  if(num2>num1,Red())
              4. Click Apply

               

              You get the result

               

               

              Thanks.

              Sup