3 Replies Latest reply on May 15, 2018 3:31 AM by Zhouyi Zhang

    Need logic for formatting

    Tulu Sahoo

      Hi,

      I have a 2 columns, one as Metric_Value(Float Values) and other is format(String).

      Data in columns is as below :

      Metric_Value
      Format
      99.33percentage
      36Numeric
      78.00percentage
      120043Numeric
      100percentage
      56percentage
      258Numeric

       

      I need to change the metric_Value according to format describe if format is percentage then metric value should be in percentage format. like this :

       

      Metric_Value
      Format
      Final_Result
      99.33percentage99.33%
      36Numeric36
      78.00percentage78.00%
      120043Numeric120043
      100percentage100.00%
      56.3percentage56.30%
      258Numeric258

       

      I tried type conversion to metric value in str then add '%' in calculation but it is giving very large value "5.84674662337662E 003%"  which is not correct.

       

      Please share the logic to achieve this. Thanks in advance.