cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
JeanMartinL
Advocate II
Advocate II

Display text in table/matrix without removing whitespace

Hello everyone,

 

I have some text that include some "manual" formating with \n and spaces. It seems to load correctly in the dataset:

JeanMartinL_0-1658753496723.png

 

 

JeanMartinL_2-1658753579542.png

 

But when I use it in a visual like a Table or Matrix, the whitespace are automatically trimmed.

 

JeanMartinL_3-1658753630902.png

With a Card visual there is a "Source spacing" option which looks like it could work but as far as can tell there is no way to align left so it's hard to tell. Anyway Cards are very limited and probably wouldn't be sufficient for my needs.

 

Is there a way to display text "as is" in a table or matrix?

 

Edit:

Small addendum: I can make it work using a custom visual "Text Wrapper by MAQ Software" so it's definitely not a issue with the data itself. However just like the card it's very limiting and I really wish there was a solution for the table/matrix.

 

Thanks!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @JeanMartinL ,

 

The problem here is that the spaces get trimmed in this case you need to replace the space by the empty character.

 

You can copy paste from this link:

https://emptycharacter.com/

 

Has you can see below I have two rows one with the spaces and the empty character:

MFelix_0-1658768749697.png

 

In this I have made a replace values:

= Table.ReplaceValue(#"Added Custom"," ","<u+200f><u+200f><u+200e> <u+200e>",Replacer.ReplaceText,{"Custom"})
Table.ReplaceValue(#"Added

 nbsp;e.ReplaceValue(#"Added

nbsp;e.ReplaceValue(#"Added

The text seems the same thing but is from the white space.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @JeanMartinL ,

 

The problem here is that the spaces get trimmed in this case you need to replace the space by the empty character.

 

You can copy paste from this link:

https://emptycharacter.com/

 

Has you can see below I have two rows one with the spaces and the empty character:

MFelix_0-1658768749697.png

 

In this I have made a replace values:

= Table.ReplaceValue(#"Added Custom"," ","<u+200f><u+200f><u+200e> <u+200e>",Replacer.ReplaceText,{"Custom"})
Table.ReplaceValue(#"Added

 nbsp;e.ReplaceValue(#"Added

nbsp;e.ReplaceValue(#"Added

The text seems the same thing but is from the white space.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Well done! That's a tricky solution that I never thought about.

This works perfectly for my needs, thanks!

 

JeanMartinL_0-1658769618625.png

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors