Forum Discussion

bourne2000's avatar
bourne2000
Icon for Helper V rankHelper V
5 years ago
Solved

Converting text column into decimals?

Hi I am unable to convert the below text columns into decimal

 

 

Decimals points are replacing, when I tried to convert using changed type into decimal in power query. I want to show the decimal point in my report. Also, I changed the regional settings into United States .

 

 

Any suggestions?

 

  •  

     I tried with your few rows of sample data, converting as currency and it worked fine.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQ0UIrViVYyM9azNAKzTAzM9SwswExDMyNLPUtLiAJTpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Currency.Type}})
    in
        #"Changed Type"

     

    I am not recommending but to understand the problem, Can you try doing 

         data type change to decimal in Power Query? 

    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type number}})

     

         Format in Data tab as decimal with two points?

        

     

    See if this shows as you wanted. 

1 Reply

  •  

     I tried with your few rows of sample data, converting as currency and it worked fine.

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQ0UIrViVYyM9azNAKzTAzM9SwswExDMyNLPUtLiAJTpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Currency.Type}})
    in
        #"Changed Type"

     

    I am not recommending but to understand the problem, Can you try doing 

         data type change to decimal in Power Query? 

    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type number}})

     

         Format in Data tab as decimal with two points?

        

     

    See if this shows as you wanted.