+ Reply to Thread
Results 1 to 3 of 3

Power Query Text.Start/End

  1. #1
    Registered User
    Join Date
    10-23-2018
    Location
    New York
    MS-Off Ver
    10
    Posts
    27

    Power Query Text.Start/End

    I have a column of data that starts with a name then has a parenthesis with text in it. Something like the below:

    John Smith (ABC123)

    I want to insert a column in PowerQuery that lists John Smith so data prior to the space and first parenthesis. Normally would use the LEFT function in excel but need help with the formula which would either be text.start or text.end in PQ to do this. Need this column added so I can merge with another query. Any help would be much appreciated.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    2016 primarily
    Posts
    7,432

    Re: Power Query Text.Start/End

    If they all have parentheses, you'd just need something like:

    Text.Trim(Text.Start([Fieldname], Text.PositionOf([Fieldname], "(")))
    Rory

  3. #3
    Registered User
    Join Date
    10-23-2018
    Location
    New York
    MS-Off Ver
    10
    Posts
    27

    Re: Power Query Text.Start/End

    You are awesome. Works perfectly. Thanks and Cheers!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to concatenate cell reference and text in Power Query?
    By basispoints in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2019, 11:22 AM
  2. Power Query: Check if Field contains text from list
    By learning new things in forum Excel General
    Replies: 0
    Last Post: 11-07-2018, 03:33 PM
  3. [SOLVED] Power Query: Reading a text or csv file that is publicly available on the Web?
    By learning new things in forum Excel General
    Replies: 6
    Last Post: 10-31-2018, 03:12 PM
  4. Power Query - Replace If Text is Found
    By brent_milne in forum Excel General
    Replies: 1
    Last Post: 10-25-2018, 11:00 AM
  5. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  6. [SOLVED] Power Query / Get & Transform filtering on text
    By SHI.NL in forum Excel General
    Replies: 5
    Last Post: 04-28-2018, 11:50 AM
  7. Replies: 0
    Last Post: 04-05-2018, 01:16 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1