+ Reply to Thread
Results 1 to 2 of 2

Extract first 3 characters in power query

  1. #1
    Forum Contributor
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    109

    Extract first 3 characters in power query

    I have a performance measurement worksheet with over 200 columns. Each cell contains responses such as "Yes" if met or "No" if not met. Other cells are more descriptive such as "No - missing assignment" or "Yes - late but completed". I want to ultimately converting these to mathematic values for easier calculation.

    My question is how can I extract/isolate just the first 3 characters of each cell using PQ. I could split cells by column but I would end up with too additional columns. I could also "Replace" values but this can only be done by individual columns. I need to do this across 200 columns with a clean code. Any ideas?
    Last edited by KerahJoy; 03-05-2023 at 08:33 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2508 Win 11
    Posts
    24,957

    Re: Extract first 3 characters in power query

    Unpivot your data so the columns in question are now in one column. Extract the first three characters by splitting the cells or extracting. eliminate the unwanted columns and then repivot the data.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Replies: 3
    Last Post: 06-27-2022, 09:18 AM
  2. [SOLVED] Help with Power Query to extract CPT and ICD codes data
    By chandramouliarun in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-10-2022, 08:16 AM
  3. Using Power Query to extract specific data
    By JasonWier in forum Excel General
    Replies: 1
    Last Post: 09-21-2021, 11:00 AM
  4. [SOLVED] Power Query connection only and extract values
    By misty15 in forum Office 365
    Replies: 2
    Last Post: 06-10-2021, 02:51 PM
  5. [SOLVED] Power Query Extract
    By AllisterB in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-17-2021, 05:49 PM
  6. Replies: 8
    Last Post: 10-21-2020, 03:02 AM
  7. Extract data from Web using Power Query
    By jatin.c in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2020, 08:38 AM

Tags for this Thread

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