Dividing Value of Chart

Hi Abhishek,

unfortunately you currently cannot divide the output of an aggregation.

If you actually are not drawing a "Count" aggregation, but e.g. an average, you could create a scripted field in the management section, that has the value of your desired field divided by 3 in it. If you now use this scripted field to calculate average or sum or etc. it will calculate against all values divided by 3, which will have the same effect. But if you are looking into dividing the actual "count" of documents by 3, that's not working in classical visualizations.

This can work in timelion (but that would require you want to draw data over time), by calling .divide(3) on your data function (Timelion Tutorial).

Cheers,
Tim

1 Like