Hi,
I have a query, and it's working but I'd like to incorporate the 'expand' end part into the code,
but I need to use Text.Combine and first transform the values into text from numbers and I can't figure out where to place it.
This is the code ;
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Item"}, {{"Count", each _, type table [Item=text, Units=number]}}),
a = #"Grouped Rows"{[Item="a"]}[Count],
#"Added Index" = Table.AddIndexColumn(a, "Index", 1, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", (A)=> Table.SelectRows( #"Added Index" , (B)=> B[Index] = A[Index] -1 ) [Units] ),
#"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Custom", each Text.Combine(List.Transform(_, Text.From)), type text})
in
#"Extracted Values"
And I'd like to nest the last part 'extract' into it rather than just using expand columns. I've then used this as a funtion to work on all the groups.
I've attached a workbook show stages and finished example.
Richard
Bookmarks