When you do something like TotalCount(ValueA) I'm assuming you're aggregating all of the ValueA values for the documents within a certain time range. To transform that value we'd need to run some kind of script on it. Unfortunately, we don't currently support scripts for aggregations. See Scripted field on Aggregated value for a similar question.
I'm a little confused by your question though, because it seems like the Percentage result you're looking for would be a single value for a given time range, and not a value which changes over time. How were you planning on plotting this on a chart? What would you like your X-Axis to be?
I really appreciate for your prompt reply. Well my requirement is I need to calculate percentage from logged data and plot it into chart. Here I am facing couple of concern like which type of charting I should use as mostly all charts aggregate function and which is preventing me to select field. Second major thing is using scripting I can calculate percentage but neither I able to save that script nor I can create chart from that script.
Here I have attached a sample image which illustrate scenario. Is it possible to achieve using Kibana visualization?
Ah of course! That image clears things up for me and now I feel a bit silly I didn't think of that originally. The Horizontal Bar Chart visualization will let you create a chart like this. But Kibana is currently limited to visualizing certain types of buckets, e.g. terms or a date histogram. We need to add functionality support bucketing with scripts before this exact chart can be built.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.