> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sort the Data Table

As any table you might have dealt with, the Data Table can be sorted by any given column,
given that the column has a way to be ordered.

To do this, simply reach out to the column menu and go to Sort. Then choose whether you want
ascending or descending order.

<Frame>
  <img src="https://mintcdn.com/graphext/McO4MTYPhEdyoC4d/images/variable-management/sort-column.webp?fit=max&auto=format&n=McO4MTYPhEdyoC4d&q=85&s=d95432e78a70eb03853aa9771b343db7" alt="Sorting the table" width="2104" height="2148" data-path="images/variable-management/sort-column.webp" />
</Frame>

This will sort all the rows based on the columns ordering.

<Note>
  For columns that do not present a clear ordering, sorting will be done
  alphabetically. This applies to `category`, and `text`.
</Note>

<Tip>
  If you have a categorical variable that has a clear ordering but it doesn't
  sort properly, check how to convert it to an **ordinal variable** by
  [specifying the ordering in categorical
  variables](/documentation/data-preparation/variable-management-ui-config/specify-order-in-column).

  Examples of this kind of variables are **shirt sizes**, where "S" is smaller than "M", which is smaller than "L", or
  **survey answers** like "Disagree" which is smaller than "Don't Mind/Don't Know", which is smaller than
  "Agree".
</Tip>
