I want to add 3 different fields and then divide them for an average. The fields are:
business_poc_flag
technical_poc_flag
functional_poc_flag
The value is either a "1" or a "0" (business_poc_flag = 1 if the business_poc field has a value and so on).
These fields are all tied to different records that essentially are applications names, so the data looks like this:
application 1:
portfolio: security
business_poc: Joe Blow
business_poc_flag: 1
technical_poc:
technical_poc_flag: 0
functional_poc: Jane Doe
functional_poc_flag: 1
application 2
portfolio: security
business_poc:
business_poc_flag: 0
technical_poc:
technical_poc_flag: 0
functional_poc: Jane Doe
functional_poc_flag: 1
application 3
portfolio: finance
business_poc: Joe Blow
business_poc_flag: 1
technical_poc: John Bowers
technical_poc_flag: 1
functional_poc: Jane Doe
functional_poc_flag: 1
In this scenario if I were to average out the flag fields I could use it in a heat map to color code - for example:
application 1 = 0.66
application 2 = 0.33
application 3 = 1
What I want to do is create a heat map that is sorted by portfolio and colors it based on their "completion" so if you have an average of 1 (or a sum of 3) then you would be green. If you have an average of .66 (or a sum of 2) then you would be orange. If you have an average of .33 (or a sum of 1) then you would be red, and so on.
So in this scenario the first two applications are in the security portfolio and 1 app has 2 fields with value and the other has 1, so they are running a 3/6 or 50%. I'd like to figure out a way to show this. But it means I need to be able to count the number of applications, sort them by portfolio, sum the flag fields (all 3) and then divide that by the number of fields that were counted (so if there were two apps it would be 6 fields, if there were 3 apps it would be 9 fields, and so on.
When I use filters I have tried the syntax "business_poc_flag: "1" + technical_poc_flag: "1" + functional_poc_flag: "1" but it is giving me weird answers. It seems to add two of the fields, but when I get to 3 the numbers aren't adding up. What is the syntax I should be using to do this in the filter aggregation?
I cannot use scripted fields b/c of a limitation of our deployment. I'm running on 6.8.