Kibana Sum Aggregation showing wrong result

(Aditya) #1

Hello Team,

I am trying to use kibana data-table with sum aggregation, however the sum aggregation is showing wrong result
Please find below details.

Data :
image

Kibana data table with Sum aggregation
image

Actual Result :
image

Mapping for the field largenum

image

Not sure why the sum is not getting calculated correctly.

any pointers to resolve this issue are really appreciated.

Thanks in Advance,
Aditya

(Joel Griffith) #2

@adityaPsl This is due to the values themselves being stored as floating-point numbers, wherein things like sum aggregations are going to not operate as you'd expect compared to whole numbers. I think this GH issue describes it better than I did: https://github.com/elastic/elasticsearch/issues/30529

(Aditya) #3

Thank you joelgriffith , it worked. I changed the mapping from float to double.

Thank you,
Aditya