Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 New-Qlik
		
			New-Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Everyone ,
I want to implement custom sort on country. i have already tried below two approaches
1. Sort expression match(Country, 'Sweden', 'Denmark', 'Norway', 'Others')
2. in Script creating n inline table
CountrySort:
MAPPING Load * inline [
"Country " , Sort
Denmark,2
Sweden,1
Norwary,3
Other,4
];
Dual("Country ",Applymap('CountrySort',"Country ")) as "Country"
both gives me wrong order.
Any suggestions
 MindaugasBacius
		
			MindaugasBacius
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In the back end write in preferred sorting order. Simply write InLine with the same field name you wish to sort. Like
temp_sort_country:
LOAD * INLINE [
Country
Sweden
Lithuania
Denmark
USA
];
At the end of the back end script drop the table.
Drop Table temp_sort_country;
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Another approach
CountrySort:
Load *, Dual("Country ",Sort) as Dual inline [
"Country " , Sort
Denmark,2
Sweden,1
Norwary,3
Other,4
];
Now you can call, Dual field in sort expression
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If using the temp_sort_country table, make sure you uncheck all the sort options to cause it to use the load order.
-Rob
 MindaugasBacius
		
			MindaugasBacius
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In the back end write in preferred sorting order. Simply write InLine with the same field name you wish to sort. Like
temp_sort_country:
LOAD * INLINE [
Country
Sweden
Lithuania
Denmark
USA
];
At the end of the back end script drop the table.
Drop Table temp_sort_country;
 anushree1
		
			anushree1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		where are you trying to have a custom sort
 Kushal_Chawda
		
			Kushal_Chawda
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Another approach
CountrySort:
Load *, Dual("Country ",Sort) as Dual inline [
"Country " , Sort
Denmark,2
Sweden,1
Norwary,3
Other,4
];
Now you can call, Dual field in sort expression
 New-Qlik
		
			New-Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
Nope it didn't work. I have created a tale with preferred order n drop that table at very end of script. but still its shows wrong order.
 New-Qlik
		
			New-Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have tried in Chart--> sorting--> sort by expression and
in data editor .
 Kashyap_R
		
			Kashyap_R
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Can u please attach the QVF?
Thanks
 
					
				
		
 rwunderlich
		
			rwunderlich
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If using the temp_sort_country table, make sure you uncheck all the sort options to cause it to use the load order.
-Rob
 New-Qlik
		
			New-Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
Thanks for replying i tried but for some reason it didn't work.
I have a dim and in sorting i have added 'Dual' new field , it didn't work. Than i tried
match(Dual, 'Sweden','Denmark','Norwary','Finland','Other') it didnt work either
 New-Qlik
		
			New-Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes i have cross checked that too. i have a filter panel with one dim ie country ,
