Kibana Metrics Visualization : Sum Aggregation, applied to Unique (field based) objects

Hi There,

I am using Metrics Visualization tool to display the sum of a particular field, but I would like to remove duplicate objects - based on an other field, as it is done with Unique Count.

Is it possible to have a first filter that retrieves Unique objects, and then sum a particular field?

E.g.:
ID, Amount
1, 10
1, 10
2, 30
3, 20

Should give me, after removing one occurence of Object#1, 60, but with plain Sum, it gives me 70. I tried using Datables as mentionned in Sum aggregation along with Unique Count aggregation but I only want the result, as displayed in Metrics.

Thank you for your help!

Lucas

Is it possible to de-dup the documents when storing them in the index? It's hard to say without knowing more about your data, but duplicate records usually indicate an issue to be resolved at write time rather than at read time.