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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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



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. 



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
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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors