Doing Complex Calculations in Kibana

(Pulkit Sachdeva) #1


I have data from a survey coming into elastic search. I want to do visualizations for customer satisfaction, net promoter scores, etc. The issue I am facing are in calculation for these results.
I am not able to include multiple fields in my calculation for these scores.


I have attached a sample record.

Now, the error on customer satisfaction score on records like these is calculated as
1.96 * POWER(cust_sat*(1-cust_sat)/count(*),0.5):

cust_sat = sum(case when answer in ('4','5') then 1 end)/count(*)

I am new to Kibana and cant seem to find a way to do this in Kibana.

An additional requirement is any filter I do on Kibana should result in this error number changing according to the filtered data.

Looking forward to getting helpful answers.


(Mark Walkom) #2

You will need to use a scripted field to do this with the data already in ES -

However you should consider doing this before you send it to ES, ie during the index process.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.