Advertisements

Leading zeroes in Power BI: Restoring them from auto-detection of data types

Power BI tries to be helpful and auto-detects data formats such as dates, decimal numbers and integers. However if you’re dealing with zip codes, employee IDs, product IDs, etc. that have leading zeroes, you may not want them auto-converted to integers/number format which removes the leading zeroes. Here’s how to get them back.

From Power Query Editor (recommended)

  1. Click the “Data type” icon next to the column name
  2. Select “Text”
    2018-09-06_10-44-29.gif

From Data Tab

  1. Select the column header
  2. From the Modeling tab, change “Data type” to “Text”
    2018-09-06_10-42-06.gif

 

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: