I have an excel file with all of my original data, that i need to modify, once it is in Power BI. To do so, I have worked with a friend to create a simple, but effective code to to this automatically. The zip code is automatically formatted in excel, and changed from 02860 over to 2860. I did not notice it until well after it was within Power BI. So this guide is what I ran through in adding a to a column in Power BI.
Open Power BI
Open the pbix file
Click Home
Select Transform Data
Find the Zip column and highlight it. In My case the column has 2860
Click Add Column
Select Custom Column
Type in the following in the Custom Column Formula dialog box
= Text.PadStart([Zip],5,”0″)
Click Ok
That’s it! I now have a zip code column with the proper formatting of 02860 instead of 2860