Try this:
...your search...
| eval edges=x.",".y
| makemv delim="," edges
| eval edgessorted=mvjoin(mvsort(edges),",")
| stats sum(weight) as weight by edgessorted
| rex field=edgessorted "(?<x>.*),(?<y>.*)"
| table x y weight
The trick here is to create a new field (edges
) that holds both the x
and y
values, then use multivalue field functions to sort them so that the edges appear in the same order. Once you've done that you can sum the weights, and lastly get the x
and y
values back out.
Try this:
...your search...
| eval edges=x.",".y
| makemv delim="," edges
| eval edgessorted=mvjoin(mvsort(edges),",")
| stats sum(weight) as weight by edgessorted
| rex field=edgessorted "(?<x>.*),(?<y>.*)"
| table x y weight
The trick here is to create a new field (edges
) that holds both the x
and y
values, then use multivalue field functions to sort them so that the edges appear in the same order. Once you've done that you can sum the weights, and lastly get the x
and y
values back out.