Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
got the dimension as seen below
these values got related numeric values in another dimension
is there a way to sort the values by the numeric dimension when the user selects the values from the upper filter bar?
If your numeric dimension is called "MovementSortOrder" for exemple, you can solve this in the Filter pane / Listbox properties in Qlik Sense / Qlik Cloud:
=MovementSortOrder
Hey @ali_hijazi,
If you need the selections sorted specifically within the Filter Pane object, @priscilarubim's approach is the way to go.
However, if you are trying to control the sort order in the Top Selection Bar, it’s a different story. Currently, you can't achieve a custom sort there unless you create a Dual() field in the load script (see my previous post here: Solved: How to sort the selection filter at the top of a s... - Qlik Community - 2517844). If you require the sort order to react to a measure, this won't work since this method is static with the original definitions.
A few things I’ve tested but not working:
Creating a synthetic dimension with Aggr() Function: Creating a synthetic dimension (master dimension) like Aggr(Dual(field, -sum(amount)), field) sorts correctly within a chart/filter pane, but the Selection Bar still reverts to the original field's default sorting (alphabetically).
The Dual() method remains the only consistent fix, though as you noted, it can't be assigned to a measure in the UI.
Maybe someone here can help or clarify if I've missed something.
Regards,