Hi, I've pretty much got what I wanted , to insert a range at each change in list value, I did not want to group, and this is sort of grouping but not quite.
My problem is the last step i end up with a blank at bottom, witch is easy to remove but I'd rather it did not occur,
let
Source = {"A", "A", "A", "B", "C", "B", "B", "C", "C", "C", "D", "D", "D", "A", "B", "B", "D"},
alist = Source,
dlist = List.Distinct(alist),
Generate = List.Generate(() => 0,
each _ < List.Count(dlist),
each _ + 1,
each let x = dlist{_} in List.Select(alist, (A) => A = x) ),
Insert = List.Transform(Generate, each List.InsertRange(_, List.Count(_), {""})),
Combine = List.Combine(Insert)
in
Combine
I have tried to list.remvoe last within this but get an error, so any suggestions for that, and if there a better way's , I would be interested.
Richard.
Bookmarks