Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a situation where data is sorted based on some key and calculated the weighted sum.
e.g.
Line Key WeightedSum
1 1 1
2 1 2
3 1 2
4 2 1
5 2 2
Now In output file I want to choose Line 2 & 3 against Key 1 and Line 5 for key 2.
I tried tuniqrow after using sort but tuniqrow does not support multiple output. Any suggestion?
Var.lastKey==null ? Var.thisWeightedSum : Var.lastKey!= Var.thisKey ? Var.thisWeightedSum : Var.firstWeightedSum
Var.lastKey==null ? true : Var.lastKey!= Var.thisKey ? true : Var.firstWeightedSum==Var.thisWeightedSum ? true : false