# Lookup expression not returning decimals. Bug?

**URL:** <https://forum.inductiveautomation.com/t/lookup-expression-not-returning-decimals-bug/82288>\
**Category:** Ignition\
**Created:** [November 23, 2023, 8:38am UTC](https://forum.inductiveautomation.com/t/lookup-expression-not-returning-decimals-bug/82288 "2023-11-23T08:38:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johannes.bo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/johannes.bo/32/27628_2.png) [@johannes.bo](https://forum.inductiveautomation.com/u/johannes.bo)\
**Post date:** [November 23, 2023, 8:38am UTC](https://forum.inductiveautomation.com/t/lookup-expression-not-returning-decimals-bug/82288/1 "2023-11-23T08:38:53Z")

</div>

Hi, I'm trying to lookup a decimal value from a dataset. I get an integer in return.  
-Am I doing something wrong?

see attached screenshot:  
 ![Lookup expression not returning decimals](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/9/19a88ba25ffd41ddcc3fbdfa098411283ce2c8b8.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 23, 2023, 9:34am UTC](https://forum.inductiveautomation.com/t/lookup-expression-not-returning-decimals-bug/82288/2 "2023-11-23T09:34:08Z")

</div>

The user manual `lookup` page states:

**lookup(dataset, lookupValue, noMatchValue, [lookupColumn], [resultColumn])**

> **Note:** The type of the value returned will always be coerced to be the same type as the noMatchValue.

So your expression  
`lookup({Root Continer.Table 2.data}, 'Decimal Value 4.4', -99)`  
reads,

- lookup the data dataset,
- find a string with literal value 'Decimal Value 4.4',
- if not found then return value '-99', **otherwise format the result as an integer** ,
- search for the lookup value in column 0 (default),
- return the value from column 1 (default).

[https://docs.inductiveautomation.com/display/DOC81/lookup](https://docs.inductiveautomation.com/display/DOC81/lookup)

Try changing the default to `-99.0`.
