Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Please set the numeric value to descending in the sort tab.
Thanks.
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.
Hello,
I did not experience this when I reloaded and storted.
Does anyone else have a solution?
Thanks,
Michael
I answered this under your other post with the same question.
Thanks.
I am not sure I can change my date fields like this because it may cause other issues.
Michael
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;
JG