Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I've faced a problem trying to sort values in a listbox populated by the expression:
=if(EntryType = 'PR',
Project,
null()
)
The sort rule is:
State = "Auto Ascending"
Text = "A->Z"
Whenever any value from other fields is selected, the values of the listbox remain on their places although the possible values should be displayed first according to the sort rule.
The listbox with any field gets sorted perfectly well while it seems that it does not like expressions for sorting.
Are there any ideas how to solve the problem?
Thanks.
Valera
Just Change the State = "Auto Ascending" to
State = "Ascending"... It will work Fine.!!
That would be too easy. 🙂
I've already checked all the possible combinations with the STATE option in the sort rule - it seems to be simply ignored.
With any combination of STATE properties I always get the same result:
State = "AutoAscending", Text = "A -> Z"
State = "Ascending", Text = "A->Z"
If I specify just the State option in the sort rule the listbox remains simply unsorted.
Is there a solution for this problem?
Thanks.
Valera
I am QV SR3 and it is working fine for me. Which version of Qlikview are you using ?
I also use QV SR3.
However, I want to emphasise that the sorting works perfectly fine in a listbox with field name. I needed to exclude some field values and used the expression. And the sorting stopped working! 😞
I think i Got it...!!!
Just used the same Expression in the Expression tab inside sorting. It seems to be working..!!!
Yep! 🙂 Indeed, this seems to work!
Thanks! 🙂
Well, the primary objective - to put the possible values at the beginning and the excluded values at the end of the list - has been accomplished.
But I see that the sorting itself behaves strangely. This is a "sorted" list:
I can't figure out the reason why the sorting should "restart" when empty string is found! The whole list results split in 2 sorted sublists.
Why can this happen?!
hi,
Why are you using the null() in the expression any specific reason. Remove it and check
eg :
=if(EntryType = 'PR',
Project
)
I seem not to like implicit values, so prefer explicit definition of the result to be sure to have the values I want. 🙂
In this case, however, there was no specific reason for NULL(), so I removed it. But the resulting "sorted" list remains as it was before - split in two chunks... 😐