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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Leading Zero's Dropped in Poewr BI

Hi, 

 

I imported an excel sheet to my PowerBI and the zip code is dropping the leading zero. Now on my map, it's showing pings in Europe but it should be the USA but the leading zero is dropped. I double checked that my excel has the leading zero's, the column is formatted as a postal code and text. Please help.

 Annotation 2019-11-01 120503235.png

1 ACCEPTED SOLUTION

In general, zip codes should be alfa-numeric, and not whole numbers.  So you need to change the data type.  In Power BI Desktop, open the Query Editor, highlight the Zip column, from the ribbon select Home --> Data Type, and update it to Text.  Then click Close & Apply.

View solution in original post

3 REPLIES 3
jshutters
Resolver I
Resolver I

This is a situation where Power BI is not as smart as you wish it could be.  This situation is also partially addressed during the Power BI Dashboard in a Day event, if you've ever attended one.  Essentially, this could be fixed in the Query Editor when you import the data from Excel.  Be sure to import the zip code as TEXT, and then any leading zero will not be lost.

Anonymous
Not applicable

How do I do that without re creating my reports? thanks! 

In general, zip codes should be alfa-numeric, and not whole numbers.  So you need to change the data type.  In Power BI Desktop, open the Query Editor, highlight the Zip column, from the ribbon select Home --> Data Type, and update it to Text.  Then click Close & Apply.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.