
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Qlik Sense - Field Sorting in Filter Panel
Hello,
I'm having issues with sorting a field in the 'Filter Panel'. For example, if I add a field called 'Year Month' to my dashboard with a filter object (sort 1)
I can filter by an expression to filter the field. But once I make a selection and the field moves into the 'Filter Panel', I lose the sorting of this field (sort 2).
Can anyone help me with a way to filter a field once it is in the filter panel?
Thank you,
Josh
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did find a fix to my problem. I found that the default sort in the filter pane is ascending order. I wrapped a dual around my year month field and put the numeric value of the Year and Month as the second parameter:
Dual([YearMonthField],DateNum) as [Year Month F4]
When I did this, it sorted my Year Month F4 field in the filter pane ascending, or oldest to newest. I needed it flipped to newest date first, down to the oldest date, so I adjusted the numeric value to make it the negative value of the date:
Dual([YearMonthField],DateNum*-1) as [Year Month F4]
This gave me the newest year/month values at the top down to the oldest.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joshabbott
That is because your Year Month field is a text field and not a date field.
I guess that in script you did something like this to create the field:
year(date_field) &' '& month(date_field) as [Year Month]
if so, you should try some date function like
Monthname(date_field) as [Year Month]
or
Date(date_field,'YYYY MMM') as [Year Month]
Hope this helps.
Best,
Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply! So it is sorting it alphabetically by default? Do I not have any way that I can change the way it sorts in this filter panel or is it always alphabetically? Even if I did make this a date, it would sort the dates in ascending order, but I'd want it in descending order.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @joshabbott
Yes, it is default for text field
for numeric or date, the default would be numerical value.
in any case, for every object you have a section to specify the sorting criteria (text, numeric value, custom order) and also to set ascending or descending.
this video is for an old version but it’s similar
hope this helps.
best,
Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
One more thing that a just realize reviewing your post.
What o said applies to filter object or any chart object.
for the filters in the upper filter panel is default, you can’t change that.
Hope this helps.
best,
Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry, I stated my reply wrong. So in the filter panel only (not an object on the dashboard) I have no control of the sort order? It will always be descending based on the data type, I can't make it ascending? The dimension value already selected in the filter panel is what I'm frustrated about not being able to change. I have a user that makes a selection from a filter object on the dashboard, but then is trying to change the filter value from the filter panel and it is always sorted different, so they called this out to us.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I got it.
sorry I misunderstood
this is working as designed … sorry I can not help you with that.
best.
Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did find a fix to my problem. I found that the default sort in the filter pane is ascending order. I wrapped a dual around my year month field and put the numeric value of the Year and Month as the second parameter:
Dual([YearMonthField],DateNum) as [Year Month F4]
When I did this, it sorted my Year Month F4 field in the filter pane ascending, or oldest to newest. I needed it flipped to newest date first, down to the oldest date, so I adjusted the numeric value to make it the negative value of the date:
Dual([YearMonthField],DateNum*-1) as [Year Month F4]
This gave me the newest year/month values at the top down to the oldest.
