3 Replies Latest reply on Jan 14, 2014 10:17 AM by KK Molugu

    Syntax to format value as % with optional tens place

    Kurt Heisler

      The formula snippit below formats a value as a percent:

      ...

      THEN mid(str(round(min([Value]),3)),3,2) + "." + mid(str(round(min([Value]),3)),5,1)+  "%" else str(round(min([Value]),0))

      .. .

       

      So I get desired formats like 90.2%, 15.0%, but when the value is < 10% I get an undesirable '0' in the tens place, as in 09.2%.

       

      How can I eliminate the 0 in the tens place when it's not needed?

       

      Thank you!