Forum Discussion
Krish_76
9 years agoFrequent Visitor
Leading Zero Issue
Hello everyone I am having trouble with the Zip codes when it has 0 as the leading. Example : I have data like this in excel NJ 07306 TN 38120 When i imported into Power BI, it is ...
- Anonymous9 years ago
Quick solution is to create a new custom column in DAX with a formula:
FullZip = FORMAT([Zip], "00000")
Where [Zip] is your zip code field name.
nchambe
7 years agoAdvocate II
Changing the data format to text should resolve this issue as long as the original data has the leading zeroes. I've demonstrated it here: https://sharepointlibrarian.com/2018/09/06/leading-zeroes-in-power-bi-restoring-them-from-auto-detection-of-data-types/
ACT
7 years agoFrequent Visitor
Thank you nchambe! Sorry I forgot to update...it turned out that the issue was in SQL Server, not Power BI.