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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello All,
I was wondering how do you handle removing of inner spaces in a column which has values like:
USA; CHICAGO
USA: CHICAGO
USA: CHICAGO
In M I did a Text.Split on space and then Text.Combine, but just thinking if that is effective and the best way to handle this situation or not?
Thank You
Solved! Go to Solution.
#"Replaced Value" = Table.ReplaceValue(#"Changed Type"," ","",Replacer.ReplaceText,{"Country"})
Yes, see code below.
Column = SUBSTITUTE ( Table1[Column1], " ", "" )
By the way, you may also use SUBSTITUTE in DAX.
@v-chuncz-msft - will this handle multiple space issues? Like sometimes its a double space, or three spaces or more?
Yes, see code below.
Column = SUBSTITUTE ( Table1[Column1], " ", "" )
#"Replaced Value" = Table.ReplaceValue(#"Changed Type"," ","",Replacer.ReplaceText,{"Country"})
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.