Results 1 to 13 of 13

Power Query: transpose data related to same ID in row

Threaded View

  1. #11
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,404

    Re: Power Query: transpose data related to same ID in row

    Power Query
    let
      data = Excel.CurrentWorkbook(){[ Name = "Table2" ]}[Content],
      group = Table.Group ( data, { "Product Article ID" }, { { "row", ( t ) => { t{0}[Product Article ID] } & t[EAN], type list } } ),
      sortLst = List.Sort ( group[row], ( x ) => - List.Count ( x ) ),
      toTbl = Table.FromList (
        sortLst,
        ( x ) => x,
        { "Product Article ID" } & List.Transform ( { 1 .. List.Count ( sortLst{0} ) - 1 }, ( y ) => "EAN" & Text.From ( y ) )
      ),
      sortTbl = Table.Sort ( toTbl, { { "Product Article ID", Order.Ascending } } )
    in
      sortTbl
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Transpose List in power query
    By JyothiGrace in forum Excel General
    Replies: 2
    Last Post: 07-01-2022, 08:45 AM
  2. Replies: 2
    Last Post: 11-12-2021, 03:44 AM
  3. Power Query grouping of related items to find earliest datetime
    By Marbleking in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-08-2021, 03:44 AM
  4. Power Query - Transpose Specific Columns
    By keith6292 in forum Excel General
    Replies: 1
    Last Post: 07-20-2021, 04:01 PM
  5. [SOLVED] Transpose values Power Query
    By JyothiGrace in forum Excel General
    Replies: 2
    Last Post: 07-19-2021, 08:48 AM
  6. Replies: 10
    Last Post: 06-25-2020, 12:19 AM
  7. Need a solution for power query related work
    By jones143 in forum Excel General
    Replies: 0
    Last Post: 05-16-2020, 02:32 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