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

Announcements
Share your agentic AI experience, learn from others, and earn a new badge: Put Agentic AI to Work
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if time difference <= 30 'mm'

Hello,

I am calculating the time difference using this expression =INTERVAL(InitialEncounterWithDoctorDateTime-ArrivalDateTime,'mm') . Calculation works great!

In the next column, I need an expression that will count if the time difference is <=30 and another column to count when it is >30.

I've tried this expression, but it doesn't work...

 

COUNT(IF(INTERVAL(InitialEncounterWithDoctorDateTime-ArrivalDateTime <=30, 'mm'),(VisitGUID

)))

Any help is appreciated!

Labels (1)
2 Replies
eddysanchez
Partner - Creator
Partner - Creator

the count always show 1

Maybe you need:

IF(INTERVAL(InitialEncounterWithDoctorDateTime-ArrivalDateTime <=30, 'mm'),'-30','+30')


rwunderlich
MVP
MVP

I think your syntax is

COUNT(

IF(

INTERVAL(InitialEncounterWithDoctorDateTime-ArrivalDateTime, 'mm')<=30,

VisitGUID

)

)

I think you can also do

count(if (ArrivalToProv <=30, 1)

-Rob