• Resolved brokercheck

    (@brokercheck)


    Hi,

    I need some help with the sorting function.
    It does not work properly
    I thought it should sort by highest or lowest number, but often there are higher or lower numbers stuck on a wrong spot. I tried using Number + word or just number but this problem is persistant

    Also I was wondering if there is the possiblity to automatically build the average of the numbers in the footer?
    Thank you very much for this awesome plugin!
    Best regards

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The reason for this is that you sorting strings/text and not pure numbers. Text is sorted differently than numbers. (Also, characters like / or N.A. in a cell turn that column to text sorting.)

    One idea to work around this (if you can’t switch to only numbers in the cells) would be the approach with a hidden column (that only has the number) from https://wordpress.org/support/topic/date-order-6/

    Regards,
    Tobias

    Thread Starter brokercheck

    (@brokercheck)

    Hi,
    thanks for the quick answer.

    I tried deleting all words but still it gets confused when I use dots or commas somehow.
    Is there an easy fix without a hidden colum? Change the string setting somehow?

    Regarding my footer question. Is this do able or too complicated?

    Thank you very much!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    your site/table is set to be in German language, which is why the comma , is used as the decimal separator, while the dot . is used as the thousands separator.
    So, if you change everything to commas, the sorting will work fine. Alternatively, if you want to use the dot . as the decimal separator, you can change the language settings for the table, by adding another parameter to the Shortcode on that page:

    [table id=2 datatables_locale="en_US" /]
    

    Sorry for missing your other question with the footer:
    This is no problem. Just add another row to your table and add the necessary math formulas to it. For details, please see https://tablepress.org/tablepress-features-formulas/

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sorting bug / Footer question’ is closed to new replies.