Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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"})Solved! Go to 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).
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"
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:
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:
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).
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"
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 45 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |