shrewn  
                (Shruthi S)
               
                 
              
                  
                    July 1, 2016,  1:45pm
                   
                   
              1 
               
             
            
              Documents that I index into kibana have a field, "action" which can either have a string of the action performed or "no-action".
My x-axis is a histogram on field "age" in each document (multiple documents can have the same value for this field)
For each bucket created, in Kibana I want to graph a metric of :
number of documents having no no-action / total number of documents
How do I go about performing the above summation then division and plot it on kibana (as y axis value)?
             
            
               
               
               
            
            
           
          
            
            
              I believe what you want to do is to use a sub aggregation to split bars,  with a filter for "no-action" that should give you what you want.
             
            
               
               
               
            
            
           
          
            
              
                shrewn  
                (Shruthi S)
               
              
                  
                    July 2, 2016,  4:39am
                   
                   
              4 
               
             
            
              It would involve a sub aggregation but  the end result required that I 
described in the equation is like the example given here - 
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-bucket-script-aggregation.html 
             
            
               
               
               
            
            
           
          
            
            
              Scripted fields is the answer to your conundrum!
They are in settings/indices after you choose a specific index on the left.