Forum Discussion
Neseren
2 years agoFrequent Visitor
Remove duplicates based on multiple criteria
Hi I have a pretty complicated task that i'm not able to crack myself. So i hope you guys can help me out? I have a dataset consisting of batch, results, lower tolerance and upper tolerance. The b...
- 2 years ago
and try this
- 2 years ago
Thanks a lot!
You just solved my problem. Appreciate it 🙂
Ahmedx
2 years agoSuper User
ok, pls try again
(x)=> if List.Max(x[Result]) > List.Max(x[Lower tolerance]) then List.Min(x[Result]) else List.Max(x[Result])
Neseren
2 years agoFrequent Visitor
Thanks once again!
You are so close to make it right.
Unfortunately the batches ending on 7021 and 1021 gives me the number 3 in both cases.
I need in only these two cases to get the number 8 and 6.
The reason is, that the result min is outside the tolerance and i therefore need the highest numbers, because it is within the tolerances.
Additional info:
Also if, lets say i have a result above the tolerance and another beyond the tolerance, i need the result closest to the tolerance gap to be kept.
For example:
Here i need 4 and 11 to be kept.
Hope you can make it? 🙂