Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
durgabhavani
Creator III
Creator III

Help me in sorting the order of legend?

Hi All,

I have one field dayscheck as below

dayscheck

0-10 Days

11-30 Days

31-50 Days

51-70 Days

70+ Days

I used the above dayscheck field in my caliculated dimension.

=if(wildmatch(Billing,'pending','approved','Dues','Verified','Closed'),dayscheck)

Now problem is with legend. It is diplaying the order in below way,

I am unable to sort the order  Can anyone please help me to sort the order in legend.

Thanks, Durgadays.PNG


15 Replies
durgabhavani
Creator III
Creator III
Author

Ruben, I am implemented as above only, may be due to caliculated dimension it is not giving correct output.

i am getting correct order in listbox but not getting in dimension legend for piechart.

Thanks,

Durga

Not applicable

Hi Durga,

Add a sorting below sorting table.

SortingTable:

LOAD * INLINE [

dayscheck, Sort

0-10 Days,1

11-30 Days,2

31-50 Days,3

51-70 Days,4

70+ Days,5];

and then added Sort Field in the Expression as shown in the screen shot.Durga.jpg

rubenmarin

Hi durga, can you check in the sort tab if the dimension is sorted by number (not alphabetical)

Manish, Rudolf and Rupas solutions also should work, so it can be something to do with calculated dimension or other options messing, but without a sample is hard to guess, please upload a sample.

durgabhavani
Creator III
Creator III
Author

Rupas,

I have already written below script in edit script to get "dayscheck" field, so how can i change to your way to call variable 'sort' in expression tab.

Details:
LOAD *,
if(length <= 10, Dual('0-10 Days',1),
if(length <= 30, Dual('11-30 Days',2),
if(length <= 50, Dual('31-50 Days',3),
if(length <= 70, Dual('51-70 Days',4),Dual('70+ Days',5))))) as dayscheck

resident temp;
drop table temp;

Please advice1

Waiting for reply!

@ Ruben: I have no access to download and upload .qvw file in office due to security reasons.

Thanks,

Durga

rubenmarin

Hi, and paste a screenshot of the sort tab?

durgabhavani
Creator III
Creator III
Author

Ruben, when i click on numeric order it diplayed correctly.

Rupes wonderful explination.

Manish/ Rudolf thank you very much for all your support!

Thanks a ton for all!

Durga.