Forum Discussion
jaryszek
2 years agoSuper User
Check if next row in a list is different
Hi Guys, I have a list, "A, B, C" and want to check if B <> A and C <> B (so n <> n +1). Result should be {"B", "C"). I was trying with list.Accumulate, but I failed. It is possible with L...
- 2 years ago
For List.Accumulate
= List.Accumulate({1..List.Count(list)-1}, {}, (s,c)=> if list{c} <> list{c-1} then s & {list{c}} else s)
jaryszek
2 years agoSuper User
Thank you.
So List.Accumulate is not possible?
Best,
Jacek
Vijay_A_Verma
2 years agoMost Valuable Professional
For List.Accumulate
= List.Accumulate({1..List.Count(list)-1}, {}, (s,c)=> if list{c} <> list{c-1} then s & {list{c}} else s)