+ Reply to Thread
Results 1 to 4 of 4

powerquery joining two lines based on cell values

  1. #1
    Registered User
    Join Date
    03-15-2019
    Location
    kentucky
    MS-Off Ver
    365
    Posts
    17

    powerquery joining two lines based on cell values

    I would really like to get this working . I have a powerquery where i am grouping by different things and getting the results in the worksheet. I need to know how to power query to match up one more time with anyone that has two id's and the same pay rates. It needs to combine them into one.

    so in the example you will have to combine the user 3682

    it should combine him as show on the results tab

    it will combine rows b when it is two jobs titles or multiple . There could be someone working a couple more
    it would keep the same employee number , last name , first name , company and pay rate
    you will need to sum colums g through N

    this is only done if the employee number and pay rate are the same. If they are then the above needs to work. if it is not then we leave the cell alone.

    if you can not combine job code then you can just keep 1 or the other . I would like both so when i compare i know what got combined.

    I been trying ever group by i can think of. I get one part correct and it messes up the people with pay rates that are different. I just need things combined when payrates and employee number are the same.

    hopefully this makes sense.

    if this can not be done by powerquery then let me know. If it needs to be vba script or maco i am okay with that too. I just rather have it all automated.

    thank you in advanced. This is driving me nuts. I will not tell you how long i have been banging my head on the wall. The data that was sent over was not good at all. This is just the last part before i can do some real magic. Who knows I might need help with that. I am learning though with every post on here .
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: powerquery joining two lines based on cell values

    it would keep the same employee number , last name , first name , company and pay rate
    you will need to sum colums g through N

    this is only done if the employee number and pay rate are the same
    This is a contradiction...So what is it...Combine if Col's A,C,D,E,F is same or only if A & F is same?

    Your results are incorrect...See below image...

    Untitled.png

    if Col's A,C,D,E,F is same then try...

    Vba Solution...If this does not solve then Perhaps you should upload a sample file with a few more output results...
    Please Login or Register  to view this content.
    Last edited by sintek; 05-07-2021 at 03:31 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: powerquery joining two lines based on cell values

    Please try

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-15-2019
    Location
    kentucky
    MS-Off Ver
    365
    Posts
    17

    Re: powerquery joining two lines based on cell values

    bo_Ry

    i was wrong bo. You was correct as i mispoke. It looks like it is working. I will try to get it running in my project.

    sintek

    i will try your script here in a few
    Last edited by mmoore5553; 05-07-2021 at 01:12 PM.

+ 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. joining the forecast lines up with the data lines
    By I_need_help in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-23-2018, 04:11 PM
  2. [SOLVED] Report cell values in new lines based on conditions
    By magot98 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-23-2017, 05:50 AM
  3. [SOLVED] Joining and Merging separate lines on 52,000 rows of data
    By 2013-05-28 in forum Excel General
    Replies: 3
    Last Post: 02-13-2017, 04:28 PM
  4. Joining Named Lines with Other Pages
    By Jon.H1384 in forum Excel General
    Replies: 8
    Last Post: 05-28-2015, 12:11 PM
  5. Joining text based of a cell value
    By skate1991 in forum Excel General
    Replies: 3
    Last Post: 01-20-2015, 01:49 PM
  6. How to add joining lines between points in an XYplot
    By XcelGirl in forum Excel General
    Replies: 4
    Last Post: 04-29-2011, 05:54 AM
  7. Joining cell values together
    By Danny Boy via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2006, 12:10 PM

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