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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
C-Duff84
Regular Visitor

Adding spaces between all characters in a string

Hi, 

 

Wondered if anybody could help. I need to add spaces between all characters in strings in a column called [Names]

i.e the string 'Simon Jones', would become 'S i m o n  J o n e s'

 

Not sure whether I am missing a simple solution. Any assistance would be much appreciated. 

 

Thanks, 

2 ACCEPTED SOLUTIONS
ImkeF
Community Champion
Community Champion

Hi @C-Duff84 ,
you could add a column like so: 
Text.Combine(List.Transform(Text.ToList([Names]), (l)=> l & " "), "")

Please also check the file enclosed.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

CNENFRNL
Community Champion
Community Champion

= Table.AddColumn(Source, "Spaced", each Text.Combine(Text.ToList([Name]), " "))

CNENFRNL_0-1673113874040.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

4 REPLIES 4
CNENFRNL
Community Champion
Community Champion

= Table.AddColumn(Source, "Spaced", each Text.Combine(Text.ToList([Name]), " "))

CNENFRNL_0-1673113874040.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thanks! Appreciate your support

ImkeF
Community Champion
Community Champion

Hi @C-Duff84 ,
you could add a column like so: 
Text.Combine(List.Transform(Text.ToList([Names]), (l)=> l & " "), "")

Please also check the file enclosed.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thanks ImkeF! Appreciate your response

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.