Results 1 to 2 of 2

Thread: Power Query - Reformat a number to text
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Nov 2015
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Power Query - Reformat a number to text

    Hi,

    In Power Query I'm trying to convert a numeric field into the format e.g. REF00026.

    In Access it'd be "REF" & format([field],"00000").

    I can find how to add a Prefix from the format dropdown which sorts the REF part but not the bit that transforms numbers into 00000 format. Can anyone help?

    Thanks

    Baker

  2. #2
    New Member
    Join Date
    Apr 2015
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Power Query - Reformat a number to text

    The function you are looking for is Text.PadStart

    "REF" & Text.PadStart(Number.ToText([field]), 5, "0")

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •