Forum Discussion
PowerBI Dropping 0's from US zip codes while loading data
When importing a file with zip codes, PowerBI automatically drops all the leading 0's on the zip codes which then causes them to map incorrectly. Is there any way to prevent it from doing this when importing data?
- Anonymous3 years ago
Hi Anonymous ,
Turn off automatic data type detection.
When you turn off this option, if your data is imported into Power BI Desktop, data will all be displayed as text data type.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- eliasayyyMemorable Member
if you are changing the type to whole number , the first 0s will dissapear just change type back to text form and it hsould stay there
- AnonymousNot applicable
Not changing anything right now - PowerBI is automatically converting them to numbers and dropping the 0's - is there a way to prevent that?
- eliasayyyMemorable Member
go to power query , in the step change type , you will see that the column "ZIP" is not whole number but a text format
as you see
i made a sample dataset
when it loads , it automatically detects it as whoel number integerjust press on 123 and then choose text
result
- AnonymousNot applicable
For some reason, it's dropping the 0's even before it Prmotes Headers - I can't figure out a way to get it to change to Text before the data shows up.
- AnonymousNot applicable
Hi Anonymous ,
Turn off automatic data type detection.
When you turn off this option, if your data is imported into Power BI Desktop, data will all be displayed as text data type.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.