Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mstoler
Partner - Specialist
Partner - Specialist

Sort order of search in a table

Hello,

I have a date field in my table.

 

When the search in the table is opened, the oldest dates appear first.

 

I would like the opposite, have the newest dates appear first in the search.

 

How can I do this?

 

thanks,

Michael

 

1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

It may be confusing to your users, but if that's really what you need then you can use a DUAL value for the Date field where you change the sort order to be reverse by subtracting the date from a giant number.

Load
Dual(Date, '12/31/2099'-Date) as Date, Category, "Sub Category", "Minor Category", Value;
Load * Inline [
Date, Category, Sub Category, Minor Category, Value
4/1/2021, Sales Org, ,, 100
4/17/2021, Backlog, Backlog-sum, , 75
4/19/2021, Backlog, Order book, order book sum, 30
4/23/2021, Backlog, Order book, overdue order, 65
4/15/2021, Backlog, Order book, undue order, 92
4/19/2021, Backlog, Shipment without invoicing,, 33
4/16/2021, Budget Sales, ,, 81
4/23/2021, difference between budget, ,, 19
];

I say confusing to your users because the Ascending and Descending sort order for the column would be flipped.

Dalton_Ruer_0-1619027063666.png

But at least the sort order is descending for your Search filter:

Dalton_Ruer_1-1619027099647.png

 

 

View solution in original post

2 Replies
Dalton_Ruer
Support
Support

It may be confusing to your users, but if that's really what you need then you can use a DUAL value for the Date field where you change the sort order to be reverse by subtracting the date from a giant number.

Load
Dual(Date, '12/31/2099'-Date) as Date, Category, "Sub Category", "Minor Category", Value;
Load * Inline [
Date, Category, Sub Category, Minor Category, Value
4/1/2021, Sales Org, ,, 100
4/17/2021, Backlog, Backlog-sum, , 75
4/19/2021, Backlog, Order book, order book sum, 30
4/23/2021, Backlog, Order book, overdue order, 65
4/15/2021, Backlog, Order book, undue order, 92
4/19/2021, Backlog, Shipment without invoicing,, 33
4/16/2021, Budget Sales, ,, 81
4/23/2021, difference between budget, ,, 19
];

I say confusing to your users because the Ascending and Descending sort order for the column would be flipped.

Dalton_Ruer_0-1619027063666.png

But at least the sort order is descending for your Search filter:

Dalton_Ruer_1-1619027099647.png

 

 

mstoler
Partner - Specialist
Partner - Specialist
Author

Thanks,

 

I guess that is the only way.

 

I will just leave it as is because I don't want to cause other issues if I change the behavior of a date field.

 

Michael