Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 jorditorras
		
			jorditorras
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Gurús,
I have a table as follows:
| Date_Time | Rolling Time | 
|---|---|
| 22/11/2017 11:55:15 | 25 | 
| 22/11/2017 11:56:23 | 30 | 
| 22/11/2017 11:57:16 | 40 | 
| 22/11/2017 11:58:31 | 10 | 
| 22/11/2017 11:59:26 | 15 | 
And I have to make a calculation as follows:
( (Date_Time) - (Previous Date_Time) ) * Rolling Time
I've found a way for this calculation but in some cases some record is not picking the correct Previuos Date_Time.
Can anyone suggest a way for this calculation? This can be done in the script or in QlikSense Application.
Thanks in advance!!
Regards,
Jordi
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Looking to do this in script or front end?
 
					
				
		
 Ricardo_Gerhard
		
			Ricardo_Gerhard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Jordi,
You can use the function Above on chart options and Previous (script)
Above - chart function ‒ Qlik Sense
Previous - script function ‒ Qlik Sense
 
					
				
		
 jorditorras
		
			jorditorras
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Both possibilities would be fine.
Thanks,
Jordi
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The final output is needed in a chart or a KPI object?
 
					
				
		
 jorditorras
		
			jorditorras
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		For a KPI object.
