Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Sxbbb
		
			Sxbbb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Want to sort WorkOrder &'-'& SampleNo
SampleNo from ascending
Now SampleNo is not sorted ascending.
I want to sort SampleNo in every WorkOrder.
like this
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		By concatenating the fields the sample-no isn't a numeric anymore else a string-part and sorted in this way. You may get your wanted sort-order by adding extra zero's, maybe like:
field1 & num(field2, '00')
 Sxbbb
		
			Sxbbb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It got results like this.
Still not the way you want
					
				
			
			
				
			
			
			
			
			
			
			
		 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I meant to apply the adjusted concatenation within the dimension and not as sort-expression which couldn't work in this way because it creates a string and nothing what could be numerically evaluated. If you want to keep it as sort-expression you need extend the approach, maybe with: maxstring().
 Sxbbb
		
			Sxbbb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I used Code
SampleNo from ascending
					
				
			
			
				
			
			
			
			
			
			
			
		 Sxbbb
		
			Sxbbb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
I followed the previous thread
https://community.qlik.com/t5/QlikView-App-Dev/I-want-add-Value-0-to-SampleNo/td-p/2034695
 Sxbbb
		
			Sxbbb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How do I fix it so that it's in ascending order?
					
				
			
			
				
			
			
			
			
			
			
			
		 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Just follow the suggestions from above!
Beside this I recommend to transfer most of the logic into the script to avoid any challenges with calculated dimensions.
