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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
NewbieJono
Post Partisan
Post Partisan

Automatically converting To text

hello i am inporting data from a excel spreadsheet, but for some reason it is removing leading 0's

 

e.g in the excel file 25 is 025. how can i stop power query  removing the 0. for some reason it did not remove the 0 from 011!

 

Screenshot 2022-03-08 095940.jpg

1 ACCEPTED SOLUTION
Anand24
Super User
Super User

Hi @NewbieJono ,

It seems like ITT Column was taken as Number datatype by Power Query, hence 0 were removed from beginning.

When converted to text, the 0s were ignored.

You need to remove the part from M Query where ITT is converted to number datatype.

 

Weird behaviour with "011" though.

Can you paste the M Query Code here so that we can look into it?

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

In the Query Options, uncheck "Automatically detect data types..."

 

--Nate

Anand24
Super User
Super User

Hi @NewbieJono ,

It seems like ITT Column was taken as Number datatype by Power Query, hence 0 were removed from beginning.

When converted to text, the 0s were ignored.

You need to remove the part from M Query where ITT is converted to number datatype.

 

Weird behaviour with "011" though.

Can you paste the M Query Code here so that we can look into it?

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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