2 Replies Latest reply on Sep 26, 2016 12:38 PM by David Marquardt

    Conditionally format decimal place (for zero)

    David Marquardt

      I was recently looking at the following discussion:

       

       

       

      I'm trying to apply it to my situation, where I'd like labels on my bar chart to have one digit decimal (10.4, for example) in all cases except for a true zero, where I want the label to show as '0'.  Unfortunately, I keep getting '0.0'.  After applying the 'multiply by -1' tip suggested in the following discussion (Custom Format Decimal based on data ), I got '0.'  I did test out the suggested tip on positive integers, and it worked correctly. It was with the zero value that I had problems. Any thoughts on what to do at this point?  Here is my calculation for my label:

       

      IF SUM([value]) <> 0 THEN ROUND(SUM([value]), 1)

      ELSE ROUND(SUM([value]),0)*-1

      END

       

      For the formatting, I used:

       

      #,##0.#;#,##0

       

      Would appreciate ideas on how to improve this.

       

      David