# Comparing Two Datasets Values, and using those to determine difference

**URL:** <https://forum.inductiveautomation.com/t/comparing-two-datasets-values-and-using-those-to-determine-difference/23676>\
**Category:** Ignition\
**Created:** [March 28, 2019, 3:06am UTC](https://forum.inductiveautomation.com/t/comparing-two-datasets-values-and-using-those-to-determine-difference/23676 "2019-03-28T03:06:55Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 15, 2019, 8:07pm UTC](https://forum.inductiveautomation.com/t/comparing-two-datasets-values-and-using-those-to-determine-difference/23676/17 "2019-04-15T20:07:06Z")

</div>

Try this one, modify the script to fit your needs:

[Compare Datasets\_2019-04-15\_1605.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f0e12ead08b4eedfc2d3499e1a2cc4ff541dfd44.proj) (11.5 KB)

```python
editTable = event.source.parent.getComponent('Edit Table')
masterTable = event.source.parent.getComponent('Master Table')

editData = editTable.data
masterData = masterTable.data

editSet =set(tuple(row) for row in system.dataset.toPyDataSet(editData))
masterSet =set(tuple(row) for row in system.dataset.toPyDataSet(masterData))

print editSet
print masterSet
print editSet - masterSet

```

 ![2019-04-15_16-07-51](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/365ccd624f71e21850a81a22e53f026e30383933.png)

---

_[View the full topic](https://forum.inductiveautomation.com/t/comparing-two-datasets-values-and-using-those-to-determine-difference/23676)._
