Title: Sorting Logic
Last modified: May 26, 2020

---

# Sorting Logic

 *  Resolved [dmpub](https://wordpress.org/support/users/dmpub/)
 * (@dmpub)
 * [6 years ago](https://wordpress.org/support/topic/sorting-logic/)
 * Hi, Tobias
 * I created a .xlsx table and then imported it into a new TablePress table. It 
   imported perfectly.
 * I have allowed the sorting option. I have a series of columns with numeric values
   in them, or possibly a null value.
 * I would like them to sort from 1 – (biggest number) and then have the null values
   at the end.
 * In the other direction, I would like to have the null values first, then sort
   from (biggest number) – 1. Alternatively, I’m happy to go from biggest number
   to 1, then null values again at the end.
 * Currently, the null values come before 1, rather than after the max value. This
   is counter-intuitive. Null values in this table mean “least significant, less
   significant than any value” rather than “most significant, more significant than
   1”.
 * Is this possible?
 * Many tks
 * David.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsorting-logic%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years ago](https://wordpress.org/support/topic/sorting-logic/#post-12891697)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * I see what you mean, but unfortunately don’t have an easy solution here, sorry.
 * The best approach could be something like [https://wordpress.org/support/topic/date-order-6/](https://wordpress.org/support/topic/date-order-6/)
   Here, you’d add another (hidden) column to the table, which again has the values
   from the original column – except for the null values, where you’d instead insert
   a very large number. Then, you can instruct the library to use the hidden column
   for sorting of the actual column.
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Sorting Logic’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/sorting-logic/#post-12891697)
 * Status: resolved