Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bourne2000
Helper V
Helper V

Converting text column into decimals?

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

 

bourne2000_0-1630100882245.png

 

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 .

 

bourne2000_1-1630100972097.png

 

Any suggestions?

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

 

 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}})

sevenhills_0-1630107632878.png

 

     Format in Data tab as decimal with two points?

    

sevenhills_1-1630107679316.png

 

See if this shows as you wanted. 

View solution in original post

1 REPLY 1
sevenhills
Super User
Super User

 

 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}})

sevenhills_0-1630107632878.png

 

     Format in Data tab as decimal with two points?

    

sevenhills_1-1630107679316.png

 

See if this shows as you wanted. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.