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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
m_alireza
Solution Specialist
Solution Specialist

Adding extra spaces to end of value

Hi All, 

I am trying to add extra spaces and a dot to the end of my values in my column. It seems to work in Power Query but when I add it onto a table, Power BI is not honouring it...

For example, lets say I have a table with a column called Fruit. I want the values in there to have around 20 spaces (doesnt have to be exactly 20, just a good amount of spaces) after the text followed by a ".". See sample table/expected output below:

Sample table

FruitExpected Output
AppleApple               .
OrangeOrange             .
KiwiKiwi                  .


I tried using this formula in Power Query and it works when the editor is open:

= Table.AddColumn(#"Changed Type", "Fruit_Padded", each Text.PadEnd([Fruit],20) & ".")

power query space.png
but when i try to put it in a table, it doesnt work anymore. the "." is placed right after the word (although when i hover over it, I can see the spaces)
pbi desktop no space.png

Is there a way to fix this? 

Appreciate your help. 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@m_alireza Use this:

= Table.AddColumn(#"Changed Type", "Fruit Padded", each Text.PadEnd([Fruit],20,Character.FromNumber(160)) & ".")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
m_alireza
Solution Specialist
Solution Specialist

@Greg_Deckler , thank you!

Greg_Deckler
Community Champion
Community Champion

@m_alireza Use this:

= Table.AddColumn(#"Changed Type", "Fruit Padded", each Text.PadEnd([Fruit],20,Character.FromNumber(160)) & ".")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors