4 Replies Latest reply: May 11, 2016 12:56 AM by Jonathan Dienst RSS

    Num# not working to convert text item

    RYAN DAVIES

      Hello all

       

      I have a report where I have premium values that are like the following.

       

      +0000000000000000000005.0136

      and

      -0000000000000000000005.0136

       

      I have tried purging the '+' from the text item then converting them to a number such as below.

       

      Num#(purgechar(PREMIUM, '+'),'###,###;###,###-',',','.') as PREM


      Ultimately I want the data to show a positive 5.0136 and a negative 5.0136

       


      When using the code above the "numbers" still act like a text item and when extracting the to Excel they still act like text items but can be converted to numbers and Excel also removes the leading zeros.


      Even when the '+' has been removed and Num function used the field still behaves like a text item.


      However, in Qlikview there seems to be no leeway in turning this text item into a number.


      I have tried to do this within the "number tab" under table box properties but the premium value still behaves in the same way.


      Any ideas?


      Thanks any help is appreciated!