Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
adelpor1
Contributor
Contributor

Subtracting between dates and filtering

Hello All, 

I have a DDBB table in which the columns are in the format as follows: YYYY-MM-DD HH:MM:SS.S for example 2020-02-28 10:23:50.240  

Column A (Hora Peticion) is Timestamp for order and Column B is timestamp for delivery (HoraDescarga) . The delivery time is  =interval(HoraDescarga-HoraPeticion)

My aim is to plot which values are above a certain time for example 00:10:00 - ten minutes and which are below this time. Ending up with a histogram as a result with "OK" values and "NOK" values for the total deliveries. 

What expressions can i use inside the plot chart so it appears this way? I suppose one expression for "OK" and one for "NOK" . I manage to get the intervals with : =interval(HoraDescarga-HoraPeticion) but need to filter these results. 

Thanks 

Labels (1)
2 Replies
rubenmarin
MVP
MVP

Hi, you can try with:

If(HoraDescarga-HoraPeticion<1/24/6, 'OK, 'NOK')

adelpor1
Contributor
Contributor
Author

Hi, thanks for the reply. 

 

How would the count function work here?