Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I have a column where values get changed depending on the decimal values like if it is 20.5 then it converted to 20 and if it is 20.75 then it is converted to 21. Can anyone help me? How can I do these in qlik sense .
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have you tried Round() function
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		have a look
 
					
				
		
Yes ,I tried but it is not working.Both is converted to 21.Even I used floor and ceil function but still I am not able to implement both in a single column.
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		have a look
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be try this:
if(subfield(sum(F1),'.',2)<=5,floor(sum(F1)),ceil(sum(F1)))
Where F1 is your field.
 
					
				
		
it contains 60.75 ,134.5 and 26.5 and i want 61,134 and 26.
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi bhanu,
Have you tried the above solution?
It should give you expected output.
Br,
KC
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this:
if(left(subfield(sum(F1),'.',2),1)<=5,floor(sum(F1)),ceil(sum(F1)))
 
					
				
		
 atoz1158
		
			atoz1158
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have used this in past and it works well
=Floor(F1 + 0.48)
Where F1 is the field you wish to adjust.
You can change the addition of 0.48 to suit where you need to round up or down at
for example adding 0.2 will round up .8 but will round down .75
HTH
Adrian
