Hello,
I have some grouped data, and I want to return the total of the grouped columns to another columns so I can perform another operation.,
I've used Add custom column
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Sales Rep"}, {{"Tsales", each List.Sum([Sales]), type number},
{ "Products Sold " , each Text.Combine (
List.Distinct( [Product]), ", " ) }} ),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each [Tsales])
in
#"Added Custom"
and this does work, but what i'd like to do is bring jut add it to the grouping ;
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Sales Rep"}, {{"Tsales", each List.Sum([Sales]), type number},
{ "Products Sold " , each Text.Combine (
List.Distinct( [Product]), ", " ) } ,{ "Tsales2" , each [Tsales] }} )
in
#"Grouped Rows"
But this does not recognise the Column Tsales.
I've attached small workbook with 3 queries 2 of which work but aren't quite what I want and one which doesn't but would like to get working.
Richard.
Bookmarks