Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kumarsudhakar
Contributor II
Contributor II

dynamic sorting in qlik sense chart

Hi,

Pick(match(Name,'Ramesh','Raju','Gayathri','Samba','kumar','Anitha','Bujji','Catherine','Dana','Prasad'),1,2,3,4,5,6,7,8,9,10).

This above expression is the sorting expression but it is static one. We need to take it as a dynamic in the same order. any idea.

Your valuable ideas will help me. Please let me know if you have any idea.

Thanks,  

6 Replies
sunny_talwar

You need the same sort, but with a dynamic sort? What exactly do you mean when you say dynamic?

kumarsudhakar
Contributor II
Contributor II
Author

Hi Sunny,

Thanks for ur reply,

Actually in above expression we are mentioning the Name values statically like each and every value right, after some days or months some more values will be added to that Name column so we have to add that again to this expression, That is what I am telling this expression is static. But we need the same order which I am given in that expression. If anything add there that should be the next values.

I hope you understand my question.

Thanks, 

sunny_talwar

But when the new Names are added how will they be sorted? You need to somehow enter the sort information somewhere, right?

kumarsudhakar
Contributor II
Contributor II
Author

yes,

If it is script that is fine.

But if I do that because of the association order will be changed.

sunny_talwar

Create this inline table at the very beginning of your script

LOAD * INLINE [

Name

Ramesh

Raju

Gayathri

Samba

kumar

Anitha

Bujji

Catherine

Dana

Prasad

];

and then in your chart sort by load order

kumarsudhakar
Contributor II
Contributor II
Author

Thanks Sunny, its helped me a lot.