locked
MAKE LIST OF DUPLICATING VALUES RRS feed

  • Question

  • I HAVE 2 COLUMNS, 1 HAS DUPLICATES AND THE OTHER COLUMN IS DIFFERENT. 

    I WANTED TO MAKE A NEW TABLE WITH INDIVIDUAL VALUES AND A LIST OF ITS CORRESPONDING VALUES . HERE IS A SCREENSHOT

    


    mtsj

    Friday, February 1, 2019 5:47 PM

Answers

  • Hi

    Assuming data in Table1 with columns [column1] and [column2]

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"column1", type text}, {"column2", type text}}),
        #"Grouped Rows" = Table.Group(#"Changed Type", {"column2"}, {{"ListOfColumn1Values", each _[column1], type list}})
    in
        #"Grouped Rows"


    • Edited by Lz._ Friday, February 1, 2019 6:59 PM typo
    • Marked as answer by mtsj Friday, February 1, 2019 8:16 PM
    Friday, February 1, 2019 6:58 PM