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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RobbeVL
Impactful Individual
Impactful Individual

replacing values

This formula should be replacing my "." to a "," right? (to convert text into decimal number)
Why is this not happening? Can to find an explenation.

 

 

= Table.ReplaceValue(#"Replaced Value2",".",",",Replacer.ReplaceValue,{"price total", "bpost commission", "driver fee"})

pricing.jpg

1 ACCEPTED SOLUTION

Power Query has nothing like implicit type conversion, so if you want to convert text to numbers, then you need to change type.

 

If your number format differs from the format in the text, then you can change the type and choose Using Locale..

Next supply the culture code that conforms to your input format, i.c. e.g. English (United States).

 

Using Locale.pngUsing Locale 2.png

 

Generated code (step 2 is the result from the pictures above):

 

let
    Source = #table(type table[price total = text],{{"15.02"},{"15.02"},{"5.97"},{"5.97"}}),
    #"Changed Type with Locale" = Table.TransformColumnTypes(Source, {{"price total", type number}}, "en-US")
in
    #"Changed Type with Locale"

 

Specializing in Power Query Formula Language (M)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @RobbeVL

 

If you want to convert text to a decimal number you can simply do so by going to query editor and selecting decimal number format, like shown in the picture below:

Capture3131.PNG

 

If I am right it will transform "." to "," automatically.

 

Another option is to use the function "replace values" (also in the query editor) like shown in the picture below:

dadadadada.PNG

 

Regards,

 

L. Meijdam,

Power Query has nothing like implicit type conversion, so if you want to convert text to numbers, then you need to change type.

 

If your number format differs from the format in the text, then you can change the type and choose Using Locale..

Next supply the culture code that conforms to your input format, i.c. e.g. English (United States).

 

Using Locale.pngUsing Locale 2.png

 

Generated code (step 2 is the result from the pictures above):

 

let
    Source = #table(type table[price total = text],{{"15.02"},{"15.02"},{"5.97"},{"5.97"}}),
    #"Changed Type with Locale" = Table.TransformColumnTypes(Source, {{"price total", type number}}, "en-US")
in
    #"Changed Type with Locale"

 

Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors