# Compare specific fields in two documents and show on dashboard if changed

**URL:** https://discuss.elastic.co/t/compare-specific-fields-in-two-documents-and-show-on-dashboard-if-changed/26248
**Category:** Kibana
**Created:** [July 24, 2015, 2:27pm UTC](https://discuss.elastic.co/t/compare-specific-fields-in-two-documents-and-show-on-dashboard-if-changed/26248 "2015-07-24T14:27:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![karolpivo](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@karolpivo](https://discuss.elastic.co/u/karolpivo)
#### Post date: [July 24, 2015, 2:27pm UTC](https://discuss.elastic.co/t/compare-specific-fields-in-two-documents-and-show-on-dashboard-if-changed/26248/1 "2015-07-24T14:27:42Z")

</div>

I want to compare specific field of two documents in a single index. Based on my research the way to do this is to use scripting module. The script will evaluate if the fields are the same, something like this should do doc99['field\_name'].value == doc100['field\_name'].value

Is it possible to build Kibana dashboard that will compare the latest document in the index to the previous document and if the field has changed update the dashboard and show the document id or index name?

If yes how would one do it?

P.S. I'm a total newbie with ES

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 25, 2015, 2:14am UTC](https://discuss.elastic.co/t/compare-specific-fields-in-two-documents-and-show-on-dashboard-if-changed/26248/2 "2015-07-25T02:14:35Z")

</div>

Please don't create multiple threads on the one thing - [Compare specific fields in two documents and show on dashboard if changed](https://discuss.elastic.co/t/compare-specific-fields-in-two-documents-and-show-on-dashboard-if-changed/26248)

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 25, 2015, 2:14am UTC](https://discuss.elastic.co/t/compare-specific-fields-in-two-documents-and-show-on-dashboard-if-changed/26248/3 "2015-07-25T02:14:38Z")

</div>


