Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello,
I am trying to add a Prefix to Column1 only when the value in the column is a number.
I tried the below code to transform the column (without adding a new column):
= Table.TransformColumns(#"Changed Type", {{"Column1", each if Value.Is([Column1], Int64.Type ) then "$" & Text.From(_, "en-GB") else _}})
But I am getting an error:
Any steer is greatly appreciated
Solved! Go to Solution.
Use this
= Table.ReplaceValue(#"Changed Type",each [Column1], each if Value.Is([Column1],type number) then "$" & Text.From([Column1]) else [Column1],Replacer.ReplaceValue,{"Column1"})
Use this
= Table.ReplaceValue(#"Changed Type",each [Column1], each if Value.Is([Column1],type number) then "$" & Text.From([Column1]) else [Column1],Replacer.ReplaceValue,{"Column1"})
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.