• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Power Query: Add Leading Zero if Value contain Alphabets

dilawer5

Member
I need to add leading Zero to a column for two types of values.

1. Value containing numbers only which character length should be 9
2. Value containing Text which character length should be 10

I do it in excel with formula

=IF(ISNUMBER(A2),TEXT(A2,"000000000"),TEXT(A2,"0000000000"))

But when I need to do the same in Power Query I am not finding a way, due to the reason that power query is not identifying two different format types that is "Text" and "Number"

For example need to convert

12345 into 000012345
and
678910A into 000678910A

Please guide

Thanks
 
Back
Top