# \[Bug-15644\]Table sorting not working on numeric columns

**URL:** <https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [November 26, 2019, 5:12pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245 "2019-11-26T17:12:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![md.szyman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md.szyman/32/9240_2.png) [@md.szyman](https://forum.inductiveautomation.com/u/md.szyman)\
**Post date:** [November 26, 2019, 5:12pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/1 "2019-11-26T17:12:43Z")

</div>

Currently running an 8.0.7 nightly from earlier this month.

When sorting on a `render: number` column (where the data in the data source is definitely numeric), the sort seems to go by lexicographic ordering. Screenshots of ascending/descending sorts below:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/286509ee7f2c7d8912d7cb1d08fa4db5168b3884.png) ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/42e81cbe584b6906622d664239b279ed10b6ccfc.png)

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [January 29, 2020, 6:47pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/2 "2020-01-29T18:47:18Z")

</div>

What is going on with this bug? It affects both integer and float columns.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [January 29, 2020, 6:56pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/3 "2020-01-29T18:56:03Z")

</div>

We are aware of the issue and have an open ticket to fix the sorting, though there is no time estimate for when the ticket will be begun.

---

<div class="post-metadata">

**Author:** ![md.szyman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md.szyman/32/9240_2.png) [@md.szyman](https://forum.inductiveautomation.com/u/md.szyman)\
**Post date:** [February 12, 2020, 8:17pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/4 "2020-02-12T20:17:16Z")

</div>

Any updates on when this might be getting fixed?

---

<div class="post-metadata">

**Author:** ![md.szyman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md.szyman/32/9240_2.png) [@md.szyman](https://forum.inductiveautomation.com/u/md.szyman)\
**Post date:** [April 8, 2020, 3:53pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/5 "2020-04-08T15:53:04Z")

</div>

This is still happening. However, it seems like setting the column’s `numberFormat` to `none` fixes the sorting temporarialy. Probably only works well on integer-valued columns though.

---

<div class="post-metadata">

**Author:** ![ankitkarwa21](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@ankitkarwa21](https://forum.inductiveautomation.com/u/ankitkarwa21)\
**Post date:** [October 6, 2020, 7:51pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/6 "2020-10-06T19:51:35Z")

</div>

@cmallonee I am still seeing this on 8.0.15.  
Any time estimate on resolution for this?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 13, 2020, 4:11pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/7 "2020-10-13T16:11:40Z")

</div>

No, the prioritization of that ticket has resulted in it staying more or less in limbo as we address other issues.

---

<div class="post-metadata">

**Author:** ![tmahaffey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaffey/32/30949_2.png) [@tmahaffey](https://forum.inductiveautomation.com/u/tmahaffey)\
**Post date:** [October 14, 2020, 12:12am UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/8 "2020-10-14T00:12:49Z")

</div>

Thanks for keeping us updated. I’m really surprised that this bug has been going on for this long. I really needs to be fixed. But, I know its probably out of your control. I’m powerless as well but can only complain on this forum.

I will say that the poster above is correct, it appears that when you set the numberFormat to none, it sorts better

---

<div class="post-metadata">

**Author:** ![md.szyman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md.szyman/32/9240_2.png) [@md.szyman](https://forum.inductiveautomation.com/u/md.szyman)\
**Post date:** [November 4, 2020, 3:27pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/9 "2020-11-04T15:27:14Z")

</div>

Any chance this has been fixed in 8.1?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 4, 2020, 4:05pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/10 "2020-11-04T16:05:39Z")

</div>

No. We’ll update this post when it is resolved.

---

<div class="post-metadata">

**Author:** ![ShaneH](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ShaneH](https://forum.inductiveautomation.com/u/ShaneH)\
**Post date:** [December 29, 2020, 4:04am UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/11 "2020-12-29T04:04:14Z")

</div>

Following.

---

<div class="post-metadata">

**Author:** ![rbachman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rbachman/32/43718_2.png) [@rbachman](https://forum.inductiveautomation.com/u/rbachman)\
**Post date:** [January 27, 2021, 1:22pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/12 "2021-01-27T13:22:35Z")

</div>

Following.

As mentioned in a post above, setting **numberFormat** to “none” does appear to fix the issue, but it would be nice if this works by default whenever the **render** format is set to “number”.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a06f4e20ebd43feb01e5510943b01eee207ea01b.png)

---

<div class="post-metadata">

**Author:** ![matt.eaton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matt.eaton/32/72046_2.png) [@matt.eaton](https://forum.inductiveautomation.com/u/matt.eaton)\
**Post date:** [July 19, 2021, 5:21pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/13 "2021-07-19T17:21:25Z")

</div>

I’m noticing that numberFormat none fixes the issue and then a script transform where I round the values can set the format in a round-a-bout way.

---

<div class="post-metadata">

**Author:** ![osolorzano](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/osolorzano/32/6432_2.png) [@osolorzano](https://forum.inductiveautomation.com/u/osolorzano)\
**Post date:** [July 21, 2021, 11:47pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/14 "2021-07-21T23:47:39Z")

</div>

For anyone following this issue, according to our internal ticket for this, this should be fixed as of 8.1.6.

---

<div class="post-metadata">

**Author:** ![321liftoff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/321liftoff/32/27544_2.png) [@321liftoff](https://forum.inductiveautomation.com/u/321liftoff)\
**Post date:** [August 14, 2021, 4:28pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/15 "2021-08-14T16:28:40Z")

</div>

To follow up, I see this note in the 8.1.7 release notes. Can someone confirm that this corrects the issue?

> Table component will now sort values based on the underlying data type passed to it instead of sorting alphanumerically due to string formatting

---

<div class="post-metadata">

**Author:** ![ken.maze](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ken.maze/32/85876_2.png) [@ken.maze](https://forum.inductiveautomation.com/u/ken.maze)\
**Post date:** [October 7, 2021, 3:58pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/16 "2021-10-07T15:58:05Z")

</div>

I recently upgraded to 8.1.10, and it doesn’t seem fixed at all. In fact, even the numberFormat = None doesn’t seem to work. Here is some data from a table

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/5/851e9d0623aba19678e10dece5dc98a55cb60a29.png)

Here is the last page of the table, it is indeed sorting lexically instead of numerically:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/50e01494448d19928c0343fbaa152089709e8825.png)

Here is the fileSize column spec:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/b/2b8d832858020003617e40f60f7c1dab201d2e4a.png)

This does the same thing whether I call the render number or auto, numberFormat = 0,0 or None.

I did see it work once when I was fiddling with it, and was happy, then rendered it again and nothing would work for me.

Thanks  
Ken

---

<div class="post-metadata">

**Author:** ![zacharyw.larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zacharyw.larson/32/23749_2.png) [@zacharyw.larson](https://forum.inductiveautomation.com/u/zacharyw.larson)\
**Post date:** [December 9, 2021, 7:11pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/17 "2021-12-09T19:11:02Z")

</div>

I am wondering about this too.  
I am on 8.1.0

Is there a version it is working in?

I didn’t know how you setup your sorting to begin trying to sort either.  
Just check the box sortable?  
I have a dataset. I don’t see the checkbox.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3af525b7daed28b73d44653f9ae35cd49c2bc292.png)

In my case, I think I can do cases in my order by clause of my query alternatively, but then I have to add a dropdown.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 9, 2021, 8:32pm UTC](https://forum.inductiveautomation.com/t/bug-15644-table-sorting-not-working-on-numeric-columns/30245/18 "2021-12-09T20:32:49Z")

</div>

According to the [release notes](https://inductiveautomation.com/downloads/releasenotes/8.1.7#:~:text=Table%20component%20will%20now%20sort%20values%20based%20on%20the%20underlying%20data%20type%20passed%20to%20it%20instead%20of%20sorting%20alphanumerically%20due%20to%20string%20formatting), 8.1.6.
