+ Reply to Thread
Results 1 to 5 of 5

Power Query: Combine records with deliminter

  1. #1
    Registered User
    Join Date
    11-08-2015
    Location
    florida
    MS-Off Ver
    Home and Student 2016
    Posts
    11

    Power Query: Combine records with deliminter

    Hello,
    I have a dataset of over 50k records.
    I need to combine the multiple records on 2 columns with a semi colon delimiter.
    I tried merge/group by using PoweQuery but the group by will only show those columns I choose.
    I need to have all the columns displayed.
    The unique id would be based on the QueID and CustomerID and the delimiters would be on the Color and Year columns.

    Not sure if i explained this good enough, I have attached an example file.
    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    5,867

    Re: Power Query: Combine records with deliminter

    This should do it:

    Please Login or Register  to view this content.
    Last edited by Olly; 09-16-2019 at 03:21 AM.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    11-08-2015
    Location
    florida
    MS-Off Ver
    Home and Student 2016
    Posts
    11

    Re: Power Query: Combine records with deliminter

    Thank you!
    It works on my sample spreadsheet however when I put the code into my real spreadsheet it gives me an error:

    DataFormat.Error: Invalid cell value #NAME?.

    I have modified the code to the correct field names and checked that the code matches and it does so I am not sure what is wrong. The table is named Table1.
    No syntax errors have been detected in the window, only when I click Done.
    Your guidance is appreciated.
    Thank you.

  4. #4
    Forum Guru Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    5,867

    Re: Power Query: Combine records with deliminter

    You have errors in your worksheet. Remove errors.

  5. #5
    Registered User
    Join Date
    11-08-2015
    Location
    florida
    MS-Off Ver
    Home and Student 2016
    Posts
    11

    Re: Power Query: Combine records with deliminter

    Thank you.
    Ok I figured that out, I found the culprit-3 cells had that name error.

    So now it works except that the one column is not concatenating. It is a number ie: 200876 etc. and there are nulls.

    I will continue to mess with it but if you can help I appreciate it.

    I am almost there!
    Thank you!

    Good news!
    After staring at it I realized I had the real data set columns flip flopped and fixed the code.

    Thank you!
    Last edited by misty15; 09-17-2019 at 07:04 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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