Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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 List.Accumulate or I should use another function ?
Thanks!
Best,
Jacek
Solved! Go to Solution.
For List.Accumulate
= List.Accumulate({1..List.Count(list)-1}, {}, (s,c)=> if list{c} <> list{c-1} then s & {list{c}} else s)
thank you!!
Use this - Here list is your your list
List.RemoveNulls(List.Generate(()=>[x=null,i=0, c= List.Count(list)], each [i]<[c], each [i=[i]+1, x=if list{i} <> list{i-1} then list{i} else null, c=[c]], each [x]))
Thank you.
So List.Accumulate is not possible?
Best,
Jacek
For List.Accumulate
= List.Accumulate({1..List.Count(list)-1}, {}, (s,c)=> if list{c} <> list{c-1} then s & {list{c}} else s)
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
67 | |
61 | |
23 | |
17 | |
13 |