# Productivity vs Target in Kibana - how?

**URL:** https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717
**Category:** Kibana
**Created:** [August 3, 2017, 1:00pm UTC](https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717 "2017-08-03T13:00:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bat\_boro](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bat\_boro](https://discuss.elastic.co/u/bat_boro)
#### Post date: [August 3, 2017, 1:00pm UTC](https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717/1 "2017-08-03T13:00:42Z")

</div>

Hello,

I have to produce a dashboard containing a number of visualizations related to productivity vs. target and I literally have no idea if this is possible and how to do it. One idea I had was using the scripted fields and Painless but so far I haven't had any luck there either.

Here's a sample document taken directly from the Discover tab:

"\_index": "ts\_logs\_approved",  
"\_type": "log",  
"\_id": "562893",  
"\_version": 1,  
"\_score": null,  
"\_source": {  
"quantity": 400,  
"time\_type": "regular",  
"activity": "Digitization & conversion",  
"poductivity": 109.0909090909091,  
"referral\_date": "2017-06-05T21:00:00.000Z",  
"project": "Project1",  
"weight": 342.85714285714283,  
"language": "English",  
"service\_line": "Service line1",  
"approved\_timestamp": "2017-06-07T06:48:59.940Z",  
"target": 70,  
"profile\_name": "Profile1",  
"unit": "TXT",  
"@timestamp": "2017-06-29T12:40:37.572Z",  
"pvst": 155.84415584415584,  
"profile\_id": 1522,  
"activity\_type": "productive",  
"approved\_work\_activity\_id": 562893,  
"min\_target": 60,  
"@version": "1",  
"client": "Client1",  
"time\_spend": 220  
},  
"fields": {  
"referral\_date": [  
1496696400000  
],  
"approved\_timestamp": [  
1496818139940  
],  
"@timestamp": [  
1498740037572  
]  
},  
"highlight": {  
"activity\_type": [  
"@kibana-highlighted-field@productive@/kibana-highlighted-field@"  
]  
},  
"sort": [  
1496696400000  
]

There are a couple of fields of interest here, here's the breakdown:

- quantity - a number of produced units
- Client - pretty self-explanatory
- Project - same
- Language - same
- Service line - basically used to group projects relating to the same client together
- activity - can be productive activities such as writing, editing stuff, basically stuff that is delivered to clients or non-productive such as project management, trainings, etc.
- time\_spend - the number of time it took in minutes for the specified activity.

Here's the thing, there are thousands of these and I have to be able to produce a visualization that would take a given period and sum all of the time\_spend and quantity for a specific activity, unit, language, etc and then it would compare it with the actual target levels.

So for example, if I have unit1 which is targeted at 10 units per hour, but the user only submitted 8 units per hour for 1 hour, I would need to be able to visualize this using the weighted average between all logs.

Is it possible at all to do this?

Please let me know if I need to submit any more info to make it clearer.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [August 3, 2017, 2:06pm UTC](https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717/2 "2017-08-03T14:06:21Z")

</div>

@bat_boro aggregating these documents based on "activity, unit, language" would be rather easy using a Terms aggregation. You could then use the Gauge/Goal visualization in Kibana 5.5 to compare them against the targets.

---

<div class="post-metadata">

### Author: ![bat\_boro](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bat\_boro](https://discuss.elastic.co/u/bat_boro)
#### Post date: [August 3, 2017, 2:24pm UTC](https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717/3 "2017-08-03T14:24:38Z")

</div>

> [@Brandon\_Kobel](#):
>
> Gauge/Goal

Hi Brandon,

Thank you very much for this, seems I've missed the Gauge/Goal visualization completely. This sounds like it might definitely work!

Cheers

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [August 3, 2017, 2:26pm UTC](https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717/4 "2017-08-03T14:26:17Z")

</div>

@bar\_boro that's great! They were just introduced, and the documentation for them in still lacking, but hopefully they will get you what you're looking for!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 31, 2017, 2:26pm UTC](https://discuss.elastic.co/t/productivity-vs-target-in-kibana-how/95717/5 "2017-08-31T14:26:20Z")

</div>

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