Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Convert minus number

How can I convert -1.5 of type text to number?  I tried with value() but getting error :

 

Cannot convert '-1.5' of type text to type number.

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    You can use the CONVERT() function keeping the second argument as Double. 

    For Example: 

    ConvertToDecimal = CONVERT(ALL('Table1'[Column1]),DOUBLE)
     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You can use the CONVERT() function keeping the second argument as Double. 

    For Example: 

    ConvertToDecimal = CONVERT(ALL('Table1'[Column1]),DOUBLE)
     
  • Anonymous , Try to change the data type to number(Power Query). Is it giving error

    • Anonymous's avatar
      Anonymous
      Not applicable

      Can you explain more with example?

       

  • prashpawar's avatar
    prashpawar
    Frequent Visitor

    Hello Anonymous 

    Please try in tranform Data ( Query Editor )
    change datatype of this particular colunm to number

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Unfortunately it is not possible to do this. I read data from a table which other values in this table works fine for other measures. I should do this seperately with dax.