# Dataset lookup

**URL:** <https://forum.inductiveautomation.com/t/dataset-lookup/3471>\
**Category:** Ignition\
**Created:** [October 21, 2011, 12:58pm UTC](https://forum.inductiveautomation.com/t/dataset-lookup/3471 "2011-10-21T12:58:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon.Trusik](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jon.Trusik](https://forum.inductiveautomation.com/u/Jon.Trusik)\
**Post date:** [October 21, 2011, 12:58pm UTC](https://forum.inductiveautomation.com/t/dataset-lookup/3471/1 "2011-10-21T12:58:45Z")

</div>

I’ve got a dynamic property dataset. It has multiple columns and I need to query against this using the Lookup expression. Problem is, the criteria involves values from 2 of the columns, anyway to do this easily?

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.inductiveautomation.com/u/nathan)\
**Post date:** [October 21, 2011, 1:34pm UTC](https://forum.inductiveautomation.com/t/dataset-lookup/3471/2 "2011-10-21T13:34:23Z")

</div>

You should be able to use other functions like [concat](http://inductiveautomation.com/support/usermanuals/ignition/gen_strings_concat.htm) (string concatenation) within your lookup expression.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [March 20, 2012, 11:24pm UTC](https://forum.inductiveautomation.com/t/dataset-lookup/3471/3 "2012-03-20T23:24:08Z")

</div>

I do not understand how I could you the concat function. here is what my dataset looks like:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/1eeead1acfc3a2148e2e1fd3f5d84b251d867743.PNG)  

I want to return the value in column “Text”, but i want to lookup the number 2012 in column “y” and the number 4 in column “m”

```auto
lookup({Root Container.SellDays},2012,"","y","Text")
```

how do i incorporate column “m” in the above code?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 20, 2012, 11:47pm UTC](https://forum.inductiveautomation.com/t/dataset-lookup/3471/4 "2012-03-20T23:47:59Z")

</div>

You can’t do that with the lookup function right now. However, you can add an additional column to the dataset (if it is a SQL query) called ym which is a concatentation of the year and month columns. In MySQL you can do the following:`SELECT CONCAT(year, month)`

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [March 20, 2012, 11:58pm UTC](https://forum.inductiveautomation.com/t/dataset-lookup/3471/5 "2012-03-20T23:58:22Z")

</div>

ok, i can do that. it sounded like it could be done on the ignition side.

Thanks,
