Forum Discussion

dantyson80's avatar
dantyson80
Frequent Visitor
4 years ago
Solved

Convert column into measure

I have a ZIP code column that needs cleaned up to use for a map visual. Some of the zip codes are Canadian (start with letters) and the rest are USA. Some of the US-based ZIP codes are missing leadin...
  • dantyson80's avatar
    4 years ago

    I eventually figured out a solution, which is a bit of a workaround unfortunately. In Power Query, I first created a Custom Column that shows me number of characters in the ZIP column:

    Then I was able to create a query that adds the leading zero if the length was less than 5: