This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have the Balance Sheet data where it shows the sales and % in this format 1.36M , 2.4B and 1.2% now I want the Power query to convert it in 1360000,2400000000 and % should remain the same. Is their any way ? I have tried doing it with Replace value but did not work. Is there a way to convert it with power query not with DAX?
Thanks
Solved! Go to Solution.
Hi @Hamdan1234 ,
Two menthods, please check:
#1. Replace value on current column.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText("i45WMtQzNvNVitWJVjLSM3ECMwz1jFSVYmMB", BinaryEncoding.Base64),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [Sales = _t]
),
#"Changed Type" = Table.TransformColumnTypes(Source, {{"Sales", type text}}),
Custom1 = Table.ReplaceValue(
#"Changed Type",
each [Sales],
each
if Text.EndsWith([Sales], "M") then
Text.From(Number.From(Text.Replace([Sales], "M", "")) * 1000000)
else if Text.EndsWith([Sales], "B") then
Text.From(Number.From(Text.Replace([Sales], "B", "")) * 1000000000)
else
[Sales],
Replacer.ReplaceText,
{"Sales"}
)
in
Custom1
#2. Create a new column.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText("i45WMtQzNvNVitWJVjLSM3ECMwz1jFSVYmMB", BinaryEncoding.Base64),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [Sales = _t]
),
#"Changed Type" = Table.TransformColumnTypes(Source, {{"Sales", type text}}),
#"Added Custom" = Table.AddColumn(
#"Changed Type",
"Custom",
each
if Text.EndsWith([Sales], "M") then
Number.From(Text.Replace([Sales], "M", "")) * 1000000
else if Text.EndsWith([Sales], "B") then
Number.From(Text.Replace([Sales], "B", "")) * 1000000000
else
[Sales]
)
in
#"Added Custom"
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Hamdan1234 ,
Two menthods, please check:
#1. Replace value on current column.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText("i45WMtQzNvNVitWJVjLSM3ECMwz1jFSVYmMB", BinaryEncoding.Base64),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [Sales = _t]
),
#"Changed Type" = Table.TransformColumnTypes(Source, {{"Sales", type text}}),
Custom1 = Table.ReplaceValue(
#"Changed Type",
each [Sales],
each
if Text.EndsWith([Sales], "M") then
Text.From(Number.From(Text.Replace([Sales], "M", "")) * 1000000)
else if Text.EndsWith([Sales], "B") then
Text.From(Number.From(Text.Replace([Sales], "B", "")) * 1000000000)
else
[Sales],
Replacer.ReplaceText,
{"Sales"}
)
in
Custom1
#2. Create a new column.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText("i45WMtQzNvNVitWJVjLSM3ECMwz1jFSVYmMB", BinaryEncoding.Base64),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [Sales = _t]
),
#"Changed Type" = Table.TransformColumnTypes(Source, {{"Sales", type text}}),
#"Added Custom" = Table.AddColumn(
#"Changed Type",
"Custom",
each
if Text.EndsWith([Sales], "M") then
Number.From(Text.Replace([Sales], "M", "")) * 1000000
else if Text.EndsWith([Sales], "B") then
Number.From(Text.Replace([Sales], "B", "")) * 1000000000
else
[Sales]
)
in
#"Added Custom"
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can control the display format in the visual Format pane.
https://powerbidocs.com/2020/09/26/custom-display-units-in-power-bi/
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 41 | |
| 21 | |
| 18 |