Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to know if anyone knows how to sort the values in a listbox, when one is forced to have an expression in the sort tab?
I had to use the same expression from the general tab in the sort tab
if(datakilde='Aarlig', Aktivitetsnavn)
- otherwise the listbox didn't show the associated values (from a selected value from another listbox) in the top of the listbox - which aren't very user friendly.
But as a consequence the sorting in alphabetic order is no longer works...
See my sort tab below.
Kind Regards Maria
I got a tip from Stackoverflow that said:
There are multiple solutions on this, but I think the correct one, would be to create a field in your datamodel, that contains just the values that need in the listbox.
Listboxes are not very good at filtering data. So take your if statement, and put it into the source table:
if(datakilde='Aarlig', Aktivitetsnavn) as Aktivitetsnavn_2
Then you don't have to struggle with filtering data in listboxes and your sorting will be correct.
After I put the if statement in the script instead of the listbox, it worked. Now I don't need to use an expression in the general tab and because of that I don't have any problems with the associated values not being shown i the top of the listbox. And therefore I don't need the expression i the sort tab either- which now has resulted in no problems with the sorting in the listbox.
It sometimes helps to set Sort by State to Ascending instead of Auto Ascending.
I already did that - but the result is the same.
Can you post a qlikview document that demonstrates the problem? If you're worried about confidential data, please read this document first: Preparing examples for Upload - Reduction and Data Scrambling
Hi maria,
did you use the sorting expression, when trying Gysbert's "Sort by State Ascending" suggestion?
without a sorting expression, just sorting by state ascending and text ascending seems to work:
whereas other settings show the behaviour, you described:
regards
Marco
I have now made my document ready to be posted in here.
Probably a stupid question, but how do I oploead the Qlikview document?
in the editor window click "use advanced editor" in the upper right and then "attach" in the lower right corner.
regards
Marco
Ok, thanks. Here is my Qlikview document - I hope someone is able to help me sort the values in the listbox in the bottom - where one can search. I hope it is not inconvenient that I used the scramble option?
I don't see any sorting issues when using the sorting setting "state ascending" like Gysbert suggested:
Do you still expect any different behaviour?
regards
Marco
When I unclick the expression in the sorting tab and only activate state with "ascending" and text with "a-z", I get the following: