Articles in this section
Category / Section

How to create custom sorting for time-based columns

Published:

In some cases, you may want to sort a column based on a specific order that doesn’t follow the default sorting options. This can be achieved using an expression column. Here’s how to create custom sorting for time-based columns:

Step 1: Create an Expression Column

Create an expression column to assign a numerical value to each time range. This will be used for sorting purposes. Use the following expression as a template:

IF([Resolution Time] = 'Within an Hour', 1, IF([Resolution Time] = 'Within 4 Hours', 2, IF([Resolution Time] = 'Within a day', 3, IF([Resolution Time] = 'Within 2 days', 4, IF([Resolution Time] = 'Within 3 days', 5,6)))))

Replace [Resolution Time] with the appropriate column name in your dataset.
image.png

Step 2: Sort the Column Based on the Expression

Now that you have an expression column with numerical values assigned to each time range, you can sort the original column based on this expression. Use the average function to sort the dimension value based on the expression.

image.png

image.png

By following these steps, you can achieve custom sorting for time-based columns in your dataset.

Additional References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
RM
Written by Reethika Moovendhan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied