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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Rohini
Helper I
Helper I

Add space tab Dax

Hi  PBI Comm,

 

What is the DAX or M to add spaces or a tab (space) in front of a text value.

2 ACCEPTED SOLUTIONS
az38
Community Champion
Community Champion

Hi @Rohini 

I m not clearly understand you needs but you can create a columns like

New column = " " & Table[OldColumn]

or 

New column = CONCATENATE( " ", Table[OldColumn])

or

New column = CONCATENATE(UNICHAR(32), Table[OldColumn])​

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

v-xuding-msft
Community Support
Community Support

Hi @Rohini ,

 

For DAX, you could use the formulas that @az38 suggests. For M, you could try below:

= Table.AddColumn(#"Changed Type", "Custom1", each Text.Insert(Text.From([Column1]),2," "))

4.PNG 

 

= Table.AddColumn(#"Changed Type", "Custom", each  "   " & [Column1])

5.PNG

 

And there is a thread about add space in the middle. You could reference to have a try,

https://community.powerbi.com/t5/Power-Query/Find-a-string-add-a-space-in-the-middle/m-p/714533

 

If these can't help you, please share some sample data and expected output. We will understand clearly about your request.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @Rohini ,

 

For DAX, you could use the formulas that @az38 suggests. For M, you could try below:

= Table.AddColumn(#"Changed Type", "Custom1", each Text.Insert(Text.From([Column1]),2," "))

4.PNG 

 

= Table.AddColumn(#"Changed Type", "Custom", each  "   " & [Column1])

5.PNG

 

And there is a thread about add space in the middle. You could reference to have a try,

https://community.powerbi.com/t5/Power-Query/Find-a-string-add-a-space-in-the-middle/m-p/714533

 

If these can't help you, please share some sample data and expected output. We will understand clearly about your request.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
Community Champion
Community Champion

Hi @Rohini 

I m not clearly understand you needs but you can create a columns like

New column = " " & Table[OldColumn]

or 

New column = CONCATENATE( " ", Table[OldColumn])

or

New column = CONCATENATE(UNICHAR(32), Table[OldColumn])​

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi  @az38 ,

 

i tried below 3 DAX options to achive space at the beginning of the Column value.. but its not working .. Can you please help.. i need to achive Space at the beginning of the column value like below

 

ak77_0-1688762863012.png

 

ew column = " " & Table[OldColumn]

or 

New column = CONCATENATE( " ", Table[OldColumn])

or

New column = CONCATENATE(UNICHAR(32), Table[OldColumn

 

Hi,

Write any of those as calculated column formulas (not as measures).


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.