+ Reply to Thread
Results 1 to 6 of 6

Power Query - Pivot multiple columns as 'Connection Only'

  1. #1
    Registered User
    Join Date
    10-07-2021
    Location
    UK
    MS-Off Ver
    MS Office Professional Plus 2016
    Posts
    16

    Power Query - Pivot multiple columns as 'Connection Only'

    I was wondering what the best way to achieve the attached transformation would be using Power Query.
    I am keen to use power query because I want the result to be 'Connection Only' which I then intend to merge with another query.
    Any thoughts would be greatly appreciated.

    Thanks,

    Martin
    Attached Files Attached Files

  2. #2
    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,830

    Re: Power Query - Pivot multiple columns as 'Connection Only'

    You cannot have merged header cells with PQ, so whatever we suggest will not look like your example.

    You can't have two rows of header data and you can't have multiple columns with the same header text.
    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.

  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,830

    Re: Power Query - Pivot multiple columns as 'Connection Only'

    The best I can suggest is to merge the header data into ONE row. Here's the M Code:

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

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Power Query - Pivot multiple columns as 'Connection Only'

    How do you plan to merge that with another query when you don't have a unique header for each column?
    Rory

  5. #5
    Registered User
    Join Date
    10-07-2021
    Location
    UK
    MS-Off Ver
    MS Office Professional Plus 2016
    Posts
    16

    Re: Power Query - Pivot multiple columns as 'Connection Only'

    this is exactly what i needed. Thanks

  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,830

    Re: Power Query - Pivot multiple columns as 'Connection Only'

    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 all those who offered help.

+ 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. [SOLVED] Power Query connection only and extract values
    By misty15 in forum Office 365
    Replies: 2
    Last Post: 06-10-2021, 02:51 PM
  2. Unable to Lookup data from Power Query Connection
    By jclaborn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-31-2020, 02:07 AM
  3. [SOLVED] How to access data via VBA from a Connection Only Power Query query.
    By MLAN_75 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-14-2020, 11:45 AM
  4. 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
  5. Replies: 0
    Last Post: 10-25-2016, 02:59 AM
  6. 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
  7. Power query load to connection
    By stephme55 in forum Excel General
    Replies: 1
    Last Post: 08-15-2016, 05: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