Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

Sort Order when using search on a column in a table

I have a column in a straight table that contains dates.  It displays in the correct order.  Most current to oldest.

However, if you click on the magnifying glass the filter box that shows up is in oldest to most current order.

Is there anyway to change the sort order of the search filter box?

6 Replies
isingh30
Specialist
Specialist

Please set the numeric value to descending in the sort tab.

Thanks.

Digvijay_Singh

The magnifying glass shows the order in which data is loaded from source(load order) for that field.

If you want to change that order, you need to somehow change the load order using 'order by' in your script.

mstoler
Partner - Specialist
Partner - Specialist

Hello,

I did not experience this when I reloaded and storted.

Does anyone else have a solution?

 

Thanks,

 

Michael

Dalton_Ruer
Support
Support

I answered this under your other post with the same question. 

mstoler
Partner - Specialist
Partner - Specialist

Thanks.

 

I am not sure I can change my date fields like this because it may cause other issues.

 

Michael

 

JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @mstoler, when using dual fields in Qlik Sense (fields with text and numeric values), Qlik Sense always order by the numeric value from lower to higher in filters and selections pane. Date fields are dual fields, so always are ordered from oldest to newest dates.

If you want to use another order, you can build your own dual field with a text showing the date and a number in the order you want. For example:

// Load Script

// Dates from 2018 to 2020, first day of every month
DatesTMP:
Load
TMPDate,
Year(TMPDate) AS MyYear,
RecNo() AS RecNo
;
Load
AddMonths(MakeDate(2018), RecNo() - 1) AS TMPDate
AutoGenerate(36);

// MyDate is a dual field with text for the date description, but a reverse number for ordering (100 - RecNo)
Dates:
NoConcatenate
Load
Dual(Day(TMPDate) & ' de ' & Month(TMPDate) & ' en ' & Year(TMPDate), 100 - RecNo) AS MyDate
Resident DatesTMP
Order By RecNo Desc;

Drop Table DatesTMP;

JuanGerardo_0-1619029113219.png

 

JG