# Delta of two dates across multiple documents

**URL:** <https://discuss.elastic.co/t/delta-of-two-dates-across-multiple-documents/110852>\
**Category:** Kibana\
**Created:** [December 8, 2017, 1:27pm UTC](https://discuss.elastic.co/t/delta-of-two-dates-across-multiple-documents/110852 "2017-12-08T13:27:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumpelblase](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kumpelblase/32/35709_2.png) [@kumpelblase](https://discuss.elastic.co/u/kumpelblase)\
**Post date:** [December 8, 2017, 1:27pm UTC](https://discuss.elastic.co/t/delta-of-two-dates-across-multiple-documents/110852/1 "2017-12-08T13:27:38Z")

</div>

I have an index with history-logs of a ticket. The mapping of that index looks like this:

```auto
> {                                
  	"mappings" : {                 
  		"ticket_history" : {         
  			"properties" : {           
  				"TTH_TicketNr" : {       
  					"type" : "integer"     
  				},                       
  				"TTH_Nummer" : {         
  					"type" : "short"       
  				},                       
  				"TTH_Benutzer" : {       
  					"type" : "short"       
  				},                       
  				"TTH_Datum" : {          
  					"type" : "date",       
  					"format" : "dd.MM.yyyy"
  				},                       
  				"TTH_Zeit" : {           
  					"type" : "date",       
  					"format" : "HH:mm:ss"  
  				},                       
  				"TTH_Aktionstyp" : {     
  					"type" : "keyword"     
  				},                       
  				"TTH_Ticketattribut" : { 
  					"type" : "keyword"     
  				},                       
  				"TTH_WertAlt" : {        
  					"type" : "text"        
  				},                       
  				"TTH_WertNeu" : {        
  					"type" : "text"        
  				}                        
  			}                          
  		}                            
  	}                              
  }                       

```

A ticket has allways multiple history-logs. I need to know if it's possible to calculate the delta of the first and last date of a ticket. So far, I managed to display th efirst and last date of a ticket, using a Kibana Data Table. Furthermore I need to calculate the average of the deltas.

This is what I allready could do:  
 ![Screenshot-2017-12-8 Kibana](https://us1.discourse-cdn.com/elastic/original/3X/4/8/48faa0a04c41c589e1a90c7d309ba231c330e59f.png)

---

<div class="post-metadata">

**Author:** ![cjcenizal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cjcenizal/32/11216_2.png) [@cjcenizal](https://discuss.elastic.co/u/cjcenizal)\
**Post date:** [December 8, 2017, 6:28pm UTC](https://discuss.elastic.co/t/delta-of-two-dates-across-multiple-documents/110852/2 "2017-12-08T18:28:56Z")

</div>

Hi there,

Unfortunately, Kibana doesn't currently support dynamic comparison between cells in a data table. I think what you're trying to do would be enabled by [https://github.com/elastic/kibana/issues/5049](https://github.com/elastic/kibana/issues/5049) and [https://github.com/elastic/kibana/issues/3620](https://github.com/elastic/kibana/issues/3620). You can subscribe to those issues if you'd like to track progress on this feature.

Thanks,  
CJ

---

<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:** [January 5, 2018, 6:29pm UTC](https://discuss.elastic.co/t/delta-of-two-dates-across-multiple-documents/110852/3 "2018-01-05T18:29:03Z")

</div>

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