+ Reply to Thread
Results 1 to 6 of 6

Extracting partial string from cells in power query

  1. #1
    Registered User
    Join Date
    06-23-2021
    Location
    Oceanside, CA
    MS-Off Ver
    365
    Posts
    10

    Extracting partial string from cells in power query

    Hi,

    I am trying to extract a partial string of text from a notes column and place that partial string of text into a new column. I am using power query, and I feel like there must be a way to to do this, but I can't quite figure it out. Any ideas?

    The attached example spreadsheet has the "original" table on the left, and the "desired outcome" table on the right. (not thru power query, I added that 3rd column manually)

    EDIT: As I think about it, being able to filter based on a partial string in power pivot would also work. Whatever is easier.
    Attached Files Attached Files
    Last edited by Nick Saunders; 07-09-2021 at 01:28 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,456

    Re: Extracting partial string from cells in power query

    You could do that with a simple formula, unless you're doing it for the experience/challenge.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Extracting partial string from cells in power query

    What's the logic? I can't help feeling that you have radically over-simplified your sample data, but ...

    M Code:

    Please Login or Register  to view this content.
    Or:

    Please Login or Register  to view this content.
    However you can do the latter by using a regular text filter on a regular table directly on the Excel page - no need for any form of pivot!
    Attached Files Attached Files
    Last edited by AliGW; 07-09-2021 at 02:30 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Extracting partial string from cells in power query

    By the way, your profile says Excel 2011: as far as I am aware, that's a Mac version that does not support PQ, so what are you using now? Please update your profile with MS365 (which is what I think you have).

  5. #5
    Registered User
    Join Date
    06-23-2021
    Location
    Oceanside, CA
    MS-Off Ver
    365
    Posts
    10

    Re: Extracting partial string from cells in power query

    I think you're right, I have excel 365 - not sure why I thought I had excel 2011.

    Thanks for the help, I think that does what I need!

    I could do the same thing in a regular table, sure, but in my "real" excel spreadsheet, I am querying dozens of spreadsheets that total to several thousand rows of data, and then I am putting it into power pivot to do some other excel wizardry before generating some pretty tailored reports. This works perfectly for my needs. Thanks again!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: Extracting partial string from cells in power query

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Extracting changes for different code elements from JSON data using Power Query
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2021, 08:12 AM
  2. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  3. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  4. Power Query: Count string of words in a cell.
    By bdpate09 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2019, 04:31 PM
  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. Power Query - merge by part of the string
    By zico8 in forum Excel General
    Replies: 1
    Last Post: 07-31-2017, 04:32 AM
  7. Power Query from CSV - possible to move connection string to excel without MS PQ?
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2016, 04:35 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