# Report Table Cell Number Format Dynamic

**URL:** <https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504>\
**Category:** Ignition\
**Created:** [May 6, 2020, 9:38pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504 "2020-05-06T21:38:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [May 6, 2020, 9:38pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/1 "2020-05-06T21:38:13Z")

</div>

Hello,

I have a customer that would like the number format of several cells of a row of data to be `#,##0.0` if the cell value is \>= 1 and `#,##0.00` if it is \< 1. Is this possible?

---

<div class="post-metadata">

**Author:** ![kaushik.shah](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@kaushik.shah](https://forum.inductiveautomation.com/u/kaushik.shah)\
**Post date:** [May 7, 2020, 1:23pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/2 "2020-05-07T13:23:28Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d8843f361e392a96bdeea3c61b2c9f3f84dfd1b6.png) ‘’

I am afraid you can do that for each cell.

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [May 7, 2020, 2:21pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/3 "2020-05-07T14:21:16Z")

</div>

I am talking about a table component in a report not a power table component in a vision window.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 7, 2020, 2:45pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/4 "2020-05-07T14:45:36Z")

</div>

Right click the number format property of the cell you want to change and select ‘use dynamic data key’. You can use a simple ternary-style if statement to choose between your two desired number formats:  
[https://docs.inductiveautomation.com/display/DOC80/Keychain+Expressions#KeychainExpressions-ConditionalKeychainExample](https://docs.inductiveautomation.com/display/DOC80/Keychain+Expressions#KeychainExpressions-ConditionalKeychainExample)

---

<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:** [May 7, 2020, 2:54pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/5 "2020-05-07T14:54:58Z")

</div>

One thing that is not in the IA docs is formatting within the keychain.  
`@Value.format("#,##0.0")@`

> **[keychains.pdf](https://www.reportmill.com/support/keychains.pdf)**
>
> 73.27 KB

---

<div class="post-metadata">

**Author:** ![dion.botha](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@dion.botha](https://forum.inductiveautomation.com/u/dion.botha)\
**Post date:** [May 7, 2020, 3:23pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/6 "2020-05-07T15:23:40Z")

</div>

I used:

`data<1?"#,##0.00":"#,##0.0"`

Worked great, thanks guys!

---

<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:** [May 7, 2020, 3:26pm UTC](https://forum.inductiveautomation.com/t/report-table-cell-number-format-dynamic/34504/7 "2020-05-07T15:26:56Z")

</div>

Well, I was thinking along the lines of

`@Value < 1 ? Value.format("#,##0.00") : Value.format("#,##0.0")@`

But I like yours too. If it works, it works! 👍
