+ Reply to Thread
Results 1 to 4 of 4

Get & Transform # Pivot/Transpose data

  1. #1
    Registered User
    Join Date
    04-08-2017
    Location
    BKK
    MS-Off Ver
    Office 2016
    Posts
    23

    Get & Transform # Pivot/Transpose data

    Hi Guys/Ladies,

    I have this huge set of the dataset of (500K) rows and I need to transport a particular field from column to row. I know how to do Unpivot in PowerQuery but Transpose in PowerQuery is kinda new to me.

    As you can see in the sample data, I need to Transpose Product ID, based on Product and Category.
    Screen Shot 2017-07-02 at 2.17.51 PM.png

    In Excel, I've to create another Column and do a nested CountIf, to create a new column ' Product ID#1, Product ID#2 and so on, and PivotTable. But that is not feasible considering the large set of data I'm working on.

    The Final Outcome will look like below
    Screen Shot 2017-07-02 at 2.18.02 PM.png

    I'm wondering if any of you can help me with the M language for PowerQuery to create the new column for Product ID#1 and so on.

    Thanks a lot
    Attached Files Attached Files
    Last edited by Ohhaa; 07-02-2017 at 03:02 AM.

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

    Re: Get & Transform # Pivot/Transpose data

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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
    Registered User
    Join Date
    04-08-2017
    Location
    BKK
    MS-Off Ver
    Office 2016
    Posts
    23

    Re: Get & Transform # Pivot/Transpose data

    Okay. I managed to merge Product & Category, Product ID & Product Description with " | " as the delimiter.
    Then I created an extra column "Column Header" as the Header to Pivot as the Column Header for " Product ID & Product Description".
    In excel the formula will be like =COUNTIF(M$4:M4,M4) to get a cumulative count for "Product & Category"
    Column M is "Product | Category "
    Screen Shot 2017-07-03 at 8.57.44 PM.png

    I'm wondering if there anyone out there that know how to do a cumulative count in PowerQuery?

    Thanks
    Attached Files Attached Files
    Last edited by Ohhaa; 07-03-2017 at 01:03 PM.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Get & Transform # Pivot/Transpose data

    [deleted by me]

+ 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. How to Transpose the data in Pivot table?
    By maxikaz in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-16-2016, 09:32 PM
  2. [SOLVED] Transform Data From Pivot Style to a Table Style
    By The_Snook in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-18-2016, 04:13 AM
  3. Pivot and Transpose data
    By lovinguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2015, 01:28 PM
  4. Transpose pivot table/consolidate data?
    By saybut in forum Excel General
    Replies: 8
    Last Post: 04-03-2014, 02:30 PM
  5. [SOLVED] Transpose/Transform a table to one coloumn
    By arunsparrow in forum Excel General
    Replies: 5
    Last Post: 07-11-2013, 09:23 AM
  6. Transform a sheet (like a Pivot) on unique observations
    By thiagoavadore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 05:35 AM
  7. [SOLVED] How to transpose data so they can be used for Pivot analysis
    By Agnese in forum Excel General
    Replies: 3
    Last Post: 07-27-2012, 02:37 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