Forum Discussion

quinnjohnson's avatar
quinnjohnson
Helper I
1 year ago
Solved

Aggregate table where a singular value from one column has multiple values in a second column

Hello,   I am wondering if it is possible to reorganize a table visual through some sort of method as follows;   The current table looks like this when I add the data to the table visual; ...
  • Fowmy's avatar
    1 year ago

    quinnjohnson 

    Here is a Power Query solution if you like:

    let
        Source = Excel.CurrentWorkbook(){[Name="Table3"]}[Content],
        #"Grouped Rows" = Table.Group(Source, {"Company Name"}, {{"Detail", each Table.TransformColumns( Table.AddIndexColumn(_,"i",1,1),{"i", each "Group" & Text.From(_)} ) }}),
        Custom1 = Table.Combine(#"Grouped Rows"[Detail]),
        #"Pivoted Column" = Table.Pivot(Custom1, List.Distinct(Custom1[i]), "i", "Group", List.Sum)
    in
        #"Pivoted Column"