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
markvsql
Resolver I
Resolver I

Power BI Desktop Query Editor Hiding Leading Spaces (Trim)

I have a data source with varying amounts of leading spaces in a text field. it is attached as Figure 1.

 

Figure 1

Source.png

 

You can see that mamy of the values have leading spaces in this Access database table.

 

When I use this table as a source for a Power BI Desktop table, the display in Query Editor shows what is in Figure 2.

 

Figure 2

Figure 2.png

 

Note the values appear to have been Trimmed. However, if I open the Filter dialog on this column, I see the following in Figure 3.

Figure 3

Figure 3.png

The values, again, appear nice and even without leading spaces. However, given the case-sensitive nature of M (and therefore Power Query), there are multiple instances of each Teacher. Each variant in terms of leading spaces is treated as a separate value. Since I created the leading spaces in the Access table on purpose, I know exactly what is happening. However, as a regular user just pulling data from a data source, this would be a VERY confusing scenario is there is no indication in the tool as to why there are multiple instances of each Teacher.

 

I would VERY MUCH prefer to have the Query Editor properly show the leading spaces if they are there. This would provide an indication to the use that they shoudl take some action if this is not what they want in their resulting table. Having both the editor as well as the filter dialog show the spaces would be my preference. 

 

 

2 REPLIES 2
WillT
Community Admin
Community Admin

Hi Mark. You'll find an option in the Query Editor to use a Monospaced font, which will show those spaces. We're tracking bugs to show them in the Data and Report views as well! Thanks Will
doktorg
Frequent Visitor

Has there been any update on this. I have a similar problem but want to view trailing spaces, so when we export the data to csv the trailing white spaces are there.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.