Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sort issue in legend

Hi All,

  I have pie chart and have ageing in legend which is in assorted manner. i want to sort it in ascending.

  Any help would be appreciated

   PFA

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

What about age band? How have you grouped data? By Rank function?, With if condition?

Let me k now

Not applicable
Author

Hi Sruti,

I would say load your age band field as a dual, so that each underlying band has a numerical value you can base your sort on.

Hope that helps

Joe

Not applicable
Author

HI Saccone,

  I grouped data with if condition

alexandros17
Partner - Champion III
Partner - Champion III

So use the same if condition in the sort ... if(data>0 and data <30, 1, if(data>xx and data < yy,2 .... )

let me know

jzimolong
Creator II
Creator II

Add the following to your load script, then sort the field in legend by "Load order".  Just make sure in below, the "AgeBand" corresponds to your field name.

AgeBand_SortOrder:
Load * Inline [
AgeBand
0-30 Days
31-60 Days
61-90 Days
91-120 Days
121-150 Days
151-180 Days
181+ Days];